Use revisions for NLL in suggestions

This commit is contained in:
Jack Huey
2022-05-22 01:36:12 -04:00
parent b391b329f0
commit fe91cfd684
23 changed files with 330 additions and 93 deletions

View File

@@ -1,11 +1,13 @@
error: lifetime may not live long enough
--> $DIR/trait-object-nested-in-impl-trait.rs:28:9
--> $DIR/trait-object-nested-in-impl-trait.rs:32:9
|
LL | fn iter(&self) -> impl Iterator<Item = Box<dyn Foo>> {
| - let's call the lifetime of this reference `'1`
LL | / Iter {
LL | |
LL | | current: None,
LL | | remaining: self.0.iter(),
LL | |
LL | | }
| |_________^ returning this value requires that `'1` must outlive `'static`
|
@@ -19,13 +21,15 @@ LL | fn iter(&self) -> impl Iterator<Item = Box<dyn Foo + '_>> {
| ++++
error: lifetime may not live long enough
--> $DIR/trait-object-nested-in-impl-trait.rs:39:9
--> $DIR/trait-object-nested-in-impl-trait.rs:45:9
|
LL | fn iter(&self) -> impl Iterator<Item = Box<dyn Foo>> + '_ {
| - let's call the lifetime of this reference `'1`
LL | / Iter {
LL | |
LL | | current: None,
LL | | remaining: self.0.iter(),
LL | |
LL | | }
| |_________^ returning this value requires that `'1` must outlive `'static`
|
@@ -35,13 +39,15 @@ LL | fn iter(&self) -> impl Iterator<Item = Box<dyn Foo + '_>> + '_ {
| ++++
error: lifetime may not live long enough
--> $DIR/trait-object-nested-in-impl-trait.rs:50:9
--> $DIR/trait-object-nested-in-impl-trait.rs:58:9
|
LL | fn iter<'a>(&'a self) -> impl Iterator<Item = Box<dyn Foo>> + 'a {
| -- lifetime `'a` defined here
LL | / Iter {
LL | |
LL | | current: None,
LL | | remaining: self.0.iter(),
LL | |
LL | | }
| |_________^ returning this value requires that `'a` must outlive `'static`
|
@@ -51,13 +57,15 @@ LL | fn iter<'a>(&'a self) -> impl Iterator<Item = Box<dyn Foo + 'a>> + 'a {
| ++++
error: lifetime may not live long enough
--> $DIR/trait-object-nested-in-impl-trait.rs:61:9
--> $DIR/trait-object-nested-in-impl-trait.rs:71:9
|
LL | fn iter<'a>(&'a self) -> impl Iterator<Item = Box<dyn Foo>> {
| -- lifetime `'a` defined here
LL | / Iter {
LL | |
LL | | current: None,
LL | | remaining: self.0.iter(),
LL | |
LL | | }
| |_________^ returning this value requires that `'a` must outlive `'static`
|