Add test for unreachable well-formedness.
This commit adds a test for checking that types are well-formed when unreachable.
This commit is contained in:
parent
f2532012dd
commit
b182a21163
7
src/test/ui/issue-54943.rs
Normal file
7
src/test/ui/issue-54943.rs
Normal file
@ -0,0 +1,7 @@
|
||||
fn foo<T: 'static>() { }
|
||||
|
||||
fn main<'a>() {
|
||||
return;
|
||||
|
||||
let x = foo::<&'a u32>();
|
||||
}
|
11
src/test/ui/issue-54943.stderr
Normal file
11
src/test/ui/issue-54943.stderr
Normal file
@ -0,0 +1,11 @@
|
||||
error[E0477]: the type `&'a u32` does not fulfill the required lifetime
|
||||
--> $DIR/issue-54943.rs:6:13
|
||||
|
|
||||
LL | let x = foo::<&'a u32>();
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: type must satisfy the static lifetime
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0477`.
|
Loading…
x
Reference in New Issue
Block a user