Sign in
fuchsia
/
third_party
/
rust
/
7de9402b77ded0d8ec9e1c554521b2121449ef2b
/
.
/
src
/
test
/
ui
/
nll
/
user-annotations
/
inherent-associated-constants.rs
blob: 2490187605ac1ecae4d2d137a72419b352b86f79 [
file
] [
log
] [
blame
]
#![
feature
(
nll
)]
struct
A
<
'a>(&'
a
());
impl
A
<
'
static
>
{
const
IC
:
i32
=
10
;
}
fn
non_wf_associated_const
<
'
a
>(
x
:
i32
)
{
A
::<
'
a
>::
IC
;
//~ ERROR lifetime may not live long enough
}
fn
wf_associated_const
<
'
a
>(
x
:
i32
)
{
A
::<
'
static
>::
IC
;
}
fn
main
()
{}