about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2016-10-29 22:57:23 -0700
committerEsteban Küber <esteban@kuber.com.ar>2016-11-10 16:22:03 -0800
commit87b6d386541c6f7a409775296da1cda2da469c36 (patch)
treee1fe4c5a2a392ca5b74d9c358a20927ab73a297a /src/test/incremental/thinlto
parentda2ce2276873242a101f205537e7ce297d68f8dd (diff)
downloadrust-87b6d386541c6f7a409775296da1cda2da469c36.tar.gz
rust-87b6d386541c6f7a409775296da1cda2da469c36.zip
Don't hint to add lifetime on trait impl
Don't provide hint to add lifetime on impl items that implement a trait.

```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 impl items that implement a trait.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions