diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2018-06-28 11:14:31 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2018-06-28 12:52:58 -0700 |
| commit | 8449c5ab8a83cfa1f89c8f7810a42a54130c844d (patch) | |
| tree | 0f2ca078b1727a96f9df3057d379567085644382 | |
| parent | 9a9b74737173945dfb616a9d9aa834f61a37f1f7 (diff) | |
Fix rebase
| -rw-r--r-- | src/librustc/hir/mod.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/impl-trait/static-return-lifetime-infered.stderr | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs index e16b6bd2b10..d8bf5fe9b6d 100644 --- a/src/librustc/hir/mod.rs +++ b/src/librustc/hir/mod.rs @@ -550,7 +550,7 @@ impl Generics { pub fn get_named(&self, name: &InternedString) -> Option<&GenericParam> { for param in &self.params { - if *name == param.name.name().as_interned_str() { + if *name == param.name.ident().as_interned_str() { return Some(param); } } diff --git a/src/test/ui/impl-trait/static-return-lifetime-infered.stderr b/src/test/ui/impl-trait/static-return-lifetime-infered.stderr index 2795bb92ed5..083ad03ff85 100644 --- a/src/test/ui/impl-trait/static-return-lifetime-infered.stderr +++ b/src/test/ui/impl-trait/static-return-lifetime-infered.stderr @@ -30,12 +30,12 @@ LL | self.x.iter().map(|a| a.0) | | | ...but this borrow... | -note: ...can't outlive the lifetime 'a as defined on the method body at 20:5 - --> $DIR/static-return-lifetime-infered.rs:20:5 +note: ...can't outlive the lifetime 'a as defined on the method body at 20:20 + --> $DIR/static-return-lifetime-infered.rs:20:20 | LL | fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: you can add a constraint to the return type to make it last less than `'static` and match the lifetime 'a as defined on the method body at 20:5 + | ^^ +help: you can add a constraint to the return type to make it last less than `'static` and match the lifetime 'a as defined on the method body at 20:20 | LL | fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> + 'a { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
