summaryrefslogtreecommitdiffstats
path: root/src/test/ui/wf/wf-in-fn-type-ret.rs
blob: ab8e697e3b9667a732196ebd732db6f55683222b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// 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() { }