mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
16 lines
255 B
Rust
16 lines
255 B
Rust
// Check that we enforce WF conditions also for return types in fn items.
|
|
|
|
#![feature(rustc_attrs)]
|
|
#![allow(dead_code)]
|
|
|
|
struct MustBeCopy<T: Copy> {
|
|
t: T,
|
|
}
|
|
|
|
fn bar<T>() -> MustBeCopy<T> //~ ERROR E0277
|
|
//~^ ERROR mismatched types
|
|
{
|
|
}
|
|
|
|
fn main() {}
|