mirror of
https://github.com/rust-lang/rust
synced 2024-09-05 16:57:03 +00:00
19 lines
251 B
Rust
19 lines
251 B
Rust
// Check that we enforce WF conditions also for types in fns.
|
|
|
|
|
|
#![allow(dead_code)]
|
|
|
|
trait Object<T> { }
|
|
|
|
struct MustBeCopy<T:Copy> {
|
|
t: T
|
|
}
|
|
|
|
struct Foo<T> {
|
|
// needs T: 'static
|
|
x: dyn Object<&'static T> //~ ERROR E0310
|
|
}
|
|
|
|
|
|
fn main() { }
|