]> git.lizzy.rs Git - rust.git/blob - tests/ui/wf/wf-in-obj-type-static.rs
Don't resolve type var roots in point_at_expr_source_of_inferred_type
[rust.git] / tests / ui / wf / wf-in-obj-type-static.rs
1 // Check that we enforce WF conditions also for types in fns.
2
3
4 #![allow(dead_code)]
5
6 trait Object<T> { }
7
8 struct MustBeCopy<T:Copy> {
9     t: T
10 }
11
12 struct Foo<T> {
13     // needs T: 'static
14     x: dyn Object<&'static T> //~ ERROR E0310
15 }
16
17
18 fn main() { }