]> git.lizzy.rs Git - rust.git/blob - tests/ui/wf/wf-in-obj-type-static.rs
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
[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() { }