65fe251634
We equate the type in the annotation with the inferred type first so that we have a fully inferred type to perform the well-formedness check on.
14 lines
187 B
Rust
14 lines
187 B
Rust
#![feature(nll)]
|
|
#![allow(warnings)]
|
|
|
|
fn foo<T: 'static>() { }
|
|
|
|
fn boo<'a>() {
|
|
return;
|
|
|
|
let x = foo::<&'a u32>();
|
|
//~^ ERROR lifetime may not live long enough
|
|
}
|
|
|
|
fn main() {}
|