Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
rfcs
/
rfc-2093-infer-outlives
/
nested-union.rs
blob: 27ebd0b54db5ddd5867500e009e22cce1e1fb782 [
file
] [
log
] [
blame
] [
edit
]
#![
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
()
{}