Further tweak wording of E0759 and introduce E0767

This commit is contained in:
Esteban Küber
2020-06-29 11:14:42 -07:00
parent 6bac3dbfc2
commit 7bf39fa9d9
43 changed files with 280 additions and 167 deletions

View File

@@ -27,7 +27,7 @@ impl Bar {
fn iter(&self) -> impl Iterator<Item = Box<dyn Foo>> {
Iter {
current: None,
remaining: self.0.iter(), //~ ERROR cannot infer an appropriate lifetime
remaining: self.0.iter(), //~ ERROR E0759
}
}
}
@@ -38,7 +38,7 @@ impl Baz {
fn iter(&self) -> impl Iterator<Item = Box<dyn Foo>> + '_ {
Iter {
current: None,
remaining: self.0.iter(), //~ ERROR cannot infer an appropriate lifetime
remaining: self.0.iter(), //~ ERROR E0759
}
}
}
@@ -49,7 +49,7 @@ impl Bat {
fn iter<'a>(&'a self) -> impl Iterator<Item = Box<dyn Foo>> + 'a {
Iter {
current: None,
remaining: self.0.iter(), //~ ERROR cannot infer an appropriate lifetime
remaining: self.0.iter(), //~ ERROR E0759
}
}
}
@@ -60,7 +60,7 @@ impl Ban {
fn iter<'a>(&'a self) -> impl Iterator<Item = Box<dyn Foo>> {
Iter {
current: None,
remaining: self.0.iter(), //~ ERROR cannot infer an appropriate lifetime
remaining: self.0.iter(), //~ ERROR E0759
}
}
}