mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
15 lines
241 B
Rust
15 lines
241 B
Rust
#![feature(rustc_attrs)]
|
|
|
|
#[rustc_outlives]
|
|
union Foo<'a, T: Copy> { //~ ERROR rustc_outlives
|
|
field1: Bar<'a, T>
|
|
}
|
|
|
|
// Type U needs to outlive lifetime 'b
|
|
#[derive(Clone, Copy)]
|
|
union Bar<'b, U: Copy> {
|
|
field2: &'b U
|
|
}
|
|
|
|
fn main() {}
|