about summary refs log tree commit diff
path: root/tests/ui/error-codes
diff options
context:
space:
mode:
authorAli MJ Al-Nasrawy <alimjalnasrawy@gmail.com>2023-09-17 14:32:02 +0000
committerAli MJ Al-Nasrawy <alimjalnasrawy@gmail.com>2023-10-08 09:59:51 +0000
commit996ffcb718941fc36ec5fdee38ed99ce20ec06d5 (patch)
treee64955715a91be92e9d9dc8da3012b4dc486a982 /tests/ui/error-codes
parent5be0b2283aa26f0fee1e3d1161524a23d65484b7 (diff)
downloadrust-996ffcb718941fc36ec5fdee38ed99ce20ec06d5.tar.gz
rust-996ffcb718941fc36ec5fdee38ed99ce20ec06d5.zip
always show and explain sub region
Diffstat (limited to 'tests/ui/error-codes')
-rw-r--r--tests/ui/error-codes/E0311.stderr14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/ui/error-codes/E0311.stderr b/tests/ui/error-codes/E0311.stderr
index de13a6148f3..4ac7c8e1310 100644
--- a/tests/ui/error-codes/E0311.stderr
+++ b/tests/ui/error-codes/E0311.stderr
@@ -1,19 +1,11 @@
 error[E0311]: the parameter type `T` may not live long enough
   --> $DIR/E0311.rs:6:5
    |
-LL |     with_restriction::<T>(x)
-   |     ^^^^^^^^^^^^^^^^^^^^^
-   |
-note: the parameter type `T` must be valid for the anonymous lifetime defined here...
-  --> $DIR/E0311.rs:5:25
-   |
 LL | fn no_restriction<T>(x: &()) -> &() {
-   |                         ^^^
-note: ...so that the type `T` will meet its required lifetime bounds
-  --> $DIR/E0311.rs:6:5
-   |
+   |                         --- the parameter type `T` must be valid for the anonymous lifetime defined here...
 LL |     with_restriction::<T>(x)
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
+   |
 help: consider adding an explicit lifetime bound...
    |
 LL | fn no_restriction<'a, T: 'a>(x: &'a ()) -> &'a () {