]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issue-54943.rs
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / issue-54943.rs
1 // compile-pass
2 // FIXME(#54943) This test targets the scenario where proving the WF requirements of a user
3 // type annotation requires checking dead code. This test should actually fail to compile.
4
5 #![feature(nll)]
6 #![allow(warnings)]
7
8 fn foo<T: 'static>() { }
9
10 fn boo<'a>() {
11     return;
12
13     let x = foo::<&'a u32>();
14     //~^ ERROR the type `&'a u32` does not fulfill the required lifetime [E0477]
15 }
16
17 fn main() {}