about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Regueiro <alexreg@me.com>2019-06-06 03:28:53 +0100
committerAlexander Regueiro <alexreg@me.com>2019-06-06 03:29:02 +0100
commitee890331f6e33afe12ef250eb6388db2aab7cbbf (patch)
tree9ae6f2e31b1ae780d45df155fc16a68b8d7d522d /src
parente37a7a1f74afb0b62b933af4439d271f4b8f890a (diff)
downloadrust-ee890331f6e33afe12ef250eb6388db2aab7cbbf.tar.gz
rust-ee890331f6e33afe12ef250eb6388db2aab7cbbf.zip
Reblessed tests with NLL compare mode on.
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/associated-type-bounds/implied-region-constraints.nll.stderr24
-rw-r--r--src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr4
-rw-r--r--src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr4
3 files changed, 28 insertions, 4 deletions
diff --git a/src/test/ui/associated-type-bounds/implied-region-constraints.nll.stderr b/src/test/ui/associated-type-bounds/implied-region-constraints.nll.stderr
new file mode 100644
index 00000000000..32d099fce75
--- /dev/null
+++ b/src/test/ui/associated-type-bounds/implied-region-constraints.nll.stderr
@@ -0,0 +1,24 @@
+error: lifetime may not live long enough
+  --> $DIR/implied-region-constraints.rs:19:56
+   |
+LL | fn _bad_st<'a, 'b, T>(x: St<'a, 'b, T>)
+   |            --  -- lifetime `'b` defined here
+   |            |
+   |            lifetime `'a` defined here
+...
+LL |     let _failure_proves_not_implied_outlives_region_b: &'b T = &x.f0;
+   |                                                        ^^^^^ type annotation requires that `'a` must outlive `'b`
+
+error: lifetime may not live long enough
+  --> $DIR/implied-region-constraints.rs:40:64
+   |
+LL | fn _bad_en7<'a, 'b, T>(x: En7<'a, 'b, T>)
+   |             --  -- lifetime `'b` defined here
+   |             |
+   |             lifetime `'a` defined here
+...
+LL |             let _failure_proves_not_implied_outlives_region_b: &'b T = &x;
+   |                                                                ^^^^^ type annotation requires that `'a` must outlive `'b`
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr
index 4b7c04f1e43..b1e4edd9980 100644
--- a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr
+++ b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr
@@ -5,7 +5,7 @@ LL | fn elided(x: &i32) -> impl Copy { x }
    |              -        ^^^^^^^^^ opaque type requires that `'1` must outlive `'static`
    |              |
    |              let's call the lifetime of this reference `'1`
-help: to allow this impl Trait to capture borrowed data with lifetime `'1`, add `'_` as a constraint
+help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a constraint
    |
 LL | fn elided(x: &i32) -> impl Copy + '_ { x }
    |                       ^^^^^^^^^^^^^^
@@ -17,7 +17,7 @@ LL | fn explicit<'a>(x: &'a i32) -> impl Copy { x }
    |             --                 ^^^^^^^^^ opaque type requires that `'a` must outlive `'static`
    |             |
    |             lifetime `'a` defined here
-help: to allow this impl Trait to capture borrowed data with lifetime `'a`, add `'a` as a constraint
+help: to allow this `impl Trait` to capture borrowed data with lifetime `'a`, add `'a` as a constraint
    |
 LL | fn explicit<'a>(x: &'a i32) -> impl Copy + 'a { x }
    |                                ^^^^^^^^^^^^^^
diff --git a/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr b/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr
index 0bf120cf7ec..0736f25cb51 100644
--- a/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr
+++ b/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr
@@ -5,7 +5,7 @@ LL |     fn iter_values_anon(&self) -> impl Iterator<Item=u32> {
    |                         -         ^^^^^^^^^^^^^^^^^^^^^^^ opaque type requires that `'1` must outlive `'static`
    |                         |
    |                         let's call the lifetime of this reference `'1`
-help: to allow this impl Trait to capture borrowed data with lifetime `'1`, add `'_` as a constraint
+help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a constraint
    |
 LL |     fn iter_values_anon(&self) -> impl Iterator<Item=u32> + '_ {
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -17,7 +17,7 @@ LL |     fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> {
    |                    --               ^^^^^^^^^^^^^^^^^^^^^^^ opaque type requires that `'a` must outlive `'static`
    |                    |
    |                    lifetime `'a` defined here
-help: to allow this impl Trait to capture borrowed data with lifetime `'a`, add `'a` as a constraint
+help: to allow this `impl Trait` to capture borrowed data with lifetime `'a`, add `'a` as a constraint
    |
 LL |     fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> + 'a {
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^