diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2016-11-12 10:38:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-12 10:38:37 +0200 |
| commit | 7894d2aad68be19a7e97194e3df4ec835ca524b6 (patch) | |
| tree | cf5f3a5d4208804ca365ce362eada9d94a2299c6 /src/test/incremental/thinlto | |
| parent | 66da9a291152feeedc9bb53f23f4577478b377e1 (diff) | |
| parent | 87b6d386541c6f7a409775296da1cda2da469c36 (diff) | |
| download | rust-7894d2aad68be19a7e97194e3df4ec835ca524b6.tar.gz rust-7894d2aad68be19a7e97194e3df4ec835ca524b6.zip | |
Rollup merge of #37481 - estebank:lifetime-help-removal-for-impl, r=eddyb
Don't provide hint to add lifetime on impl items
``` rust
use std::str::FromStr;
pub struct Foo<'a> {
field: &'a str,
}
impl<'a> FromStr for Foo<'a> {
type Err = ();
fn from_str(path: &str) -> Result<Self, ()> {
Ok(Foo { field: path })
}
}
```
would give the following hint:
``` nocode
help: consider using an explicit lifetime parameter as shown: fn from_str(path: &'a str) -> Result<Self, ()>
--> <anon>:9:5
|
9 | fn from_str(path: &str) -> Result<Self, ()> {
| ^
```
which is never correct, since then there will be a lifetime mismatch between the `impl` and the trait.
Remove this hint for all `impl` items.
Re: #37363.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
