2015-08-07 13:31:42 -04:00
|
|
|
// Check that we enforce WF conditions also for return types in fn items.
|
|
|
|
|
|
|
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
|
#![allow(dead_code)]
|
|
|
|
|
|
2024-02-09 12:17:55 +00:00
|
|
|
struct MustBeCopy<T: Copy> {
|
|
|
|
|
t: T,
|
2015-08-07 13:31:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn bar<T>() -> MustBeCopy<T> //~ ERROR E0277
|
2024-02-09 12:17:55 +00:00
|
|
|
//~^ ERROR mismatched types
|
2015-08-07 13:31:42 -04:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-09 12:17:55 +00:00
|
|
|
fn main() {}
|