rust/tests/ui/wf/wf-in-fn-type-ret.rs

13 lines
205 B
Rust

// Check that we enforce WF conditions also for types in fns.
struct MustBeCopy<T:Copy> {
t: T
}
struct Foo<T> {
// needs T: 'static
x: fn() -> MustBeCopy<T> //~ ERROR E0277
}
fn main() { }