about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-10-13 20:36:10 +0000
committerbors <bors@rust-lang.org>2021-10-13 20:36:10 +0000
commitdfc5add915e8bf4accbb7cf4de00351a7c6126a1 (patch)
treefe62477fc3e8210930c77de6a1ccd78853108ae5 /src/test/ui/error-codes
parenteeb16a2a892c2a29b1da3085e29f39efa3486e1c (diff)
parent20d6aadff7148cdce8d453b8d87b47610b1d0e41 (diff)
downloadrust-dfc5add915e8bf4accbb7cf4de00351a7c6126a1.tar.gz
rust-dfc5add915e8bf4accbb7cf4de00351a7c6126a1.zip
Auto merge of #89555 - oli-obk:nll_member_constraint_diag, r=estebank
Remove textual span from diagnostic string

This is an unnecessary repetition, as the diagnostic prints the span anyway in the source path right below the message.

I further removed the identification of the node, as that does not give any new information in any of the cases that are changed in tests.

EDIT: also inserted a suggestion that other diagnostics were already emitting
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0308-2.stderr2
-rw-r--r--src/test/ui/error-codes/E0478.stderr4
-rw-r--r--src/test/ui/error-codes/E0490.stderr12
3 files changed, 9 insertions, 9 deletions
diff --git a/src/test/ui/error-codes/E0308-2.stderr b/src/test/ui/error-codes/E0308-2.stderr
index 0ac03195fa3..5c1dcb4d4f9 100644
--- a/src/test/ui/error-codes/E0308-2.stderr
+++ b/src/test/ui/error-codes/E0308-2.stderr
@@ -6,7 +6,7 @@ LL | impl Eq for &dyn DynEq {}
    |
    = note: expected trait `<&dyn DynEq as PartialEq>`
               found trait `<&(dyn DynEq + 'static) as PartialEq>`
-note: the lifetime `'_` as defined on the impl at 9:13...
+note: the lifetime `'_` as defined here...
   --> $DIR/E0308-2.rs:9:13
    |
 LL | impl Eq for &dyn DynEq {}
diff --git a/src/test/ui/error-codes/E0478.stderr b/src/test/ui/error-codes/E0478.stderr
index 38736de8d9a..ec650085a2b 100644
--- a/src/test/ui/error-codes/E0478.stderr
+++ b/src/test/ui/error-codes/E0478.stderr
@@ -4,12 +4,12 @@ error[E0478]: lifetime bound not satisfied
 LL |     child: Box<dyn Wedding<'kiss> + 'SnowWhite>,
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-note: lifetime parameter instantiated with the lifetime `'SnowWhite` as defined on the struct at 3:22
+note: lifetime parameter instantiated with the lifetime `'SnowWhite` as defined here
   --> $DIR/E0478.rs:3:22
    |
 LL | struct Prince<'kiss, 'SnowWhite> {
    |                      ^^^^^^^^^^
-note: but lifetime parameter must outlive the lifetime `'kiss` as defined on the struct at 3:15
+note: but lifetime parameter must outlive the lifetime `'kiss` as defined here
   --> $DIR/E0478.rs:3:15
    |
 LL | struct Prince<'kiss, 'SnowWhite> {
diff --git a/src/test/ui/error-codes/E0490.stderr b/src/test/ui/error-codes/E0490.stderr
index 9ba5bc330ea..96e99bd88a4 100644
--- a/src/test/ui/error-codes/E0490.stderr
+++ b/src/test/ui/error-codes/E0490.stderr
@@ -4,12 +4,12 @@ error[E0490]: a value of type `&'b ()` is borrowed for too long
 LL |     let x: &'a _ = &y;
    |                    ^^
    |
-note: the type is valid for the lifetime `'a` as defined on the function body at 1:6
+note: the type is valid for the lifetime `'a` as defined here
   --> $DIR/E0490.rs:1:6
    |
 LL | fn f<'a, 'b>(y: &'b ()) {
    |      ^^
-note: but the borrow lasts for the lifetime `'b` as defined on the function body at 1:10
+note: but the borrow lasts for the lifetime `'b` as defined here
   --> $DIR/E0490.rs:1:10
    |
 LL | fn f<'a, 'b>(y: &'b ()) {
@@ -21,7 +21,7 @@ error[E0495]: cannot infer an appropriate lifetime for borrow expression due to
 LL |     let x: &'a _ = &y;
    |                    ^^
    |
-note: first, the lifetime cannot outlive the lifetime `'b` as defined on the function body at 1:10...
+note: first, the lifetime cannot outlive the lifetime `'b` as defined here...
   --> $DIR/E0490.rs:1:10
    |
 LL | fn f<'a, 'b>(y: &'b ()) {
@@ -31,7 +31,7 @@ note: ...so that the type `&'b ()` is not borrowed for too long
    |
 LL |     let x: &'a _ = &y;
    |                    ^^
-note: but, the lifetime must be valid for the lifetime `'a` as defined on the function body at 1:6...
+note: but, the lifetime must be valid for the lifetime `'a` as defined here...
   --> $DIR/E0490.rs:1:6
    |
 LL | fn f<'a, 'b>(y: &'b ()) {
@@ -48,7 +48,7 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requiremen
 LL |     let x: &'a _ = &y;
    |                    ^^
    |
-note: first, the lifetime cannot outlive the lifetime `'b` as defined on the function body at 1:10...
+note: first, the lifetime cannot outlive the lifetime `'b` as defined here...
   --> $DIR/E0490.rs:1:10
    |
 LL | fn f<'a, 'b>(y: &'b ()) {
@@ -60,7 +60,7 @@ LL |     let x: &'a _ = &y;
    |                    ^^
    = note: expected `&'a &()`
               found `&'a &'b ()`
-note: but, the lifetime must be valid for the lifetime `'a` as defined on the function body at 1:6...
+note: but, the lifetime must be valid for the lifetime `'a` as defined here...
   --> $DIR/E0490.rs:1:6
    |
 LL | fn f<'a, 'b>(y: &'b ()) {