about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/nll/user-annotations/normalization-2.rs2
-rw-r--r--src/test/ui/nll/user-annotations/normalization-2.stderr10
2 files changed, 10 insertions, 2 deletions
diff --git a/src/test/ui/nll/user-annotations/normalization-2.rs b/src/test/ui/nll/user-annotations/normalization-2.rs
index 92600155c7f..232b957d51f 100644
--- a/src/test/ui/nll/user-annotations/normalization-2.rs
+++ b/src/test/ui/nll/user-annotations/normalization-2.rs
@@ -68,8 +68,8 @@ fn test_variants<'a, 'b, 'c>() {
 }
 
 fn test_method_call<'a>(x: MyTy<()>) {
-    // FIXME This should fail.
     x.method2::<Ty<'a>>();
+    //~^ ERROR lifetime may not live long enough
 }
 
 fn test_struct_path<'a, 'b, 'c, 'd>() {
diff --git a/src/test/ui/nll/user-annotations/normalization-2.stderr b/src/test/ui/nll/user-annotations/normalization-2.stderr
index 5dbdb2ecea8..50382cfd953 100644
--- a/src/test/ui/nll/user-annotations/normalization-2.stderr
+++ b/src/test/ui/nll/user-annotations/normalization-2.stderr
@@ -115,6 +115,14 @@ help: the following changes may resolve your lifetime errors
    = help: replace `'c` with `'static`
 
 error: lifetime may not live long enough
+  --> $DIR/normalization-2.rs:71:7
+   |
+LL | fn test_method_call<'a>(x: MyTy<()>) {
+   |                     -- lifetime `'a` defined here
+LL |     x.method2::<Ty<'a>>();
+   |       ^^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
   --> $DIR/normalization-2.rs:88:5
    |
 LL | fn test_struct_path<'a, 'b, 'c, 'd>() {
@@ -190,5 +198,5 @@ help: the following changes may resolve your lifetime errors
    = help: replace `'b` with `'static`
    = help: replace `'c` with `'static`
 
-error: aborting due to 18 previous errors
+error: aborting due to 19 previous errors