about summary refs log tree commit diff
path: root/src/test/ui/nll
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-08-07 08:50:12 +0000
committerbors <bors@rust-lang.org>2018-08-07 08:50:12 +0000
commit9e472c2acea2b7714985390abb6b7fe420a4f346 (patch)
tree0c62c12671d80d97bfece58c1f6640266a110054 /src/test/ui/nll
parent11a902431b8e66da8486b3b9a2d8527746c6ab1a (diff)
parent49b0a1e073f708edb172cba50d8cb352204cfdc4 (diff)
downloadrust-9e472c2acea2b7714985390abb6b7fe420a4f346.tar.gz
rust-9e472c2acea2b7714985390abb6b7fe420a4f346.zip
Auto merge of #52450 - PramodBisht:issue/52413, r=estebank
Closes #52413: Provide structured suggestion instead of label

Provide structured suggestion instead of label
r? @estebank
Diffstat (limited to 'src/test/ui/nll')
-rw-r--r--src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr2
-rw-r--r--src/test/ui/nll/guarantor-issue-46974.stderr2
-rw-r--r--src/test/ui/nll/ty-outlives/impl-trait-captures.stderr6
3 files changed, 6 insertions, 4 deletions
diff --git a/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr b/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr
index a823e62d3b8..a019a7224c6 100644
--- a/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr
+++ b/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr
@@ -8,7 +8,7 @@ error[E0621]: explicit lifetime required in the type of `x`
   --> $DIR/region-lbr-anon-does-not-outlive-static.rs:19:5
    |
 LL | fn foo(x: &u32) -> &'static u32 {
-   |        - consider changing the type of `x` to `&ReStatic u32`
+   |           ---- help: add explicit lifetime `ReStatic` to the type of `x`: `&ReStatic u32`
 LL |     &*x
    |     ^^^ lifetime `ReStatic` required
 
diff --git a/src/test/ui/nll/guarantor-issue-46974.stderr b/src/test/ui/nll/guarantor-issue-46974.stderr
index 3cb20cc975f..6fc48129986 100644
--- a/src/test/ui/nll/guarantor-issue-46974.stderr
+++ b/src/test/ui/nll/guarantor-issue-46974.stderr
@@ -13,7 +13,7 @@ error[E0621]: explicit lifetime required in the type of `s`
   --> $DIR/guarantor-issue-46974.rs:25:5
    |
 LL | fn bar(s: &Box<(i32,)>) -> &'static i32 {
-   |        - consider changing the type of `s` to `&'static std::boxed::Box<(i32,)>`
+   |           ------------ help: add explicit lifetime `'static` to the type of `s`: `&'static std::boxed::Box<(i32,)>`
 LL |     // FIXME(#46983): error message should be better
 LL |     &s.0 //~ ERROR explicit lifetime required in the type of `s` [E0621]
    |     ^^^^ lifetime `'static` required
diff --git a/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr b/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr
index f836960a28c..a4f0e53386f 100644
--- a/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr
+++ b/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr
@@ -7,10 +7,12 @@ LL |     x
 error[E0621]: explicit lifetime required in the type of `x`
   --> $DIR/impl-trait-captures.rs:21:5
    |
-LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> {
-   |               - consider changing the type of `x` to `&ReEarlyBound(0, 'a) T`
 LL |     x
    |     ^ lifetime `ReEarlyBound(0, 'a)` required
+help: add explicit lifetime `ReEarlyBound(0, 'a)` to the type of `x`
+   |
+LL | fn foo<'a, T>(x: &ReEarlyBound(0, 'a) T) -> impl Foo<'a> {
+   |                  ^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error