about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-07-31 18:23:12 +0000
committerMichael Goulet <michael@errs.io>2023-08-01 17:16:47 +0000
commit1c35634efe5f69961d84b35a4e5c32cb16ecc0f6 (patch)
tree4227fc2a92c94b7c381ac036617f985d678bf7f7 /tests/ui
parent9295817badf82d4dc47c03ff84014c1e8692df45 (diff)
downloadrust-1c35634efe5f69961d84b35a4e5c32cb16ecc0f6.tar.gz
rust-1c35634efe5f69961d84b35a4e5c32cb16ecc0f6.zip
Suppress unnecessary outlives
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.rs1
-rw-r--r--tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.stderr19
2 files changed, 2 insertions, 18 deletions
diff --git a/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.rs b/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.rs
index 2fbc977b165..abc845d3afa 100644
--- a/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.rs
+++ b/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.rs
@@ -7,7 +7,6 @@ trait Iterable {
 
     fn iter(&self) -> impl Iterator<Item = Self::Item<'missing>>;
     //~^ ERROR use of undeclared lifetime name `'missing`
-    //~| ERROR the parameter type `Self` may not live long enough
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.stderr b/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.stderr
index dad308936dc..0d74c0b69ce 100644
--- a/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.stderr
+++ b/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.stderr
@@ -18,21 +18,6 @@ help: consider introducing lifetime `'missing` here
 LL | trait Iterable<'missing> {
    |               ++++++++++
 
-error[E0311]: the parameter type `Self` may not live long enough
-  --> $DIR/missing-lt-outlives-in-rpitit-114274.rs:8:37
-   |
-LL |     fn iter(&self) -> impl Iterator<Item = Self::Item<'missing>>;
-   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = help: consider adding an explicit lifetime bound `Self: 'a`...
-   = note: ...so that the type `Self` will meet its required lifetime bounds...
-note: ...that is required by this bound
-  --> $DIR/missing-lt-outlives-in-rpitit-114274.rs:6:15
-   |
-LL |         Self: 'a;
-   |               ^^
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-Some errors have detailed explanations: E0261, E0311.
-For more information about an error, try `rustc --explain E0261`.
+For more information about this error, try `rustc --explain E0261`.