Add explicit error annotations to test.

This commit adds explicit error annotations to tests after rebasing
which is now required.
This commit is contained in:
David Wood 2018-12-08 00:50:35 +01:00
parent dc41606ff4
commit 6092d92d70
No known key found for this signature in database
GPG Key ID: 01760B4F9F53F154
3 changed files with 3 additions and 1 deletions

View File

@ -4,4 +4,5 @@ fn main<'a>() {
return;
let x = foo::<&'a u32>();
//~^ ERROR the type `&'a u32` does not fulfill the required lifetime [E0477]
}

View File

@ -3,7 +3,7 @@ error[E0597]: `a` does not live long enough
|
LL | let b = Some(Cell::new(&a));
| ^^ borrowed value does not live long enough
LL | match b {
...
LL | <() as Foo<'static>>::C => { }
| ----------------------- type annotation requires that `a` is borrowed for `'static`
...

View File

@ -11,6 +11,7 @@ impl<'a, T> Foo<'a> for T {
fn main() {
let a = 22;
let b = Some(Cell::new(&a));
//~^ ERROR `a` does not live long enough [E0597]
match b {
<() as Foo<'static>>::C => { }
_ => { }