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>2017-11-03 17:30:14 -0700
committerEsteban Küber <esteban@kuber.com.ar>2017-11-05 09:55:07 -0800
commitde959afab5042c44d78703050353cb5b20d442d2 (patch)
tree47ec9abe3c5795b13712b9c90f2aca27e58f4113 /src/test/incremental/thinlto
parent5ce3d482e2313fe6795e6d688e62a092af424da8 (diff)
downloadrust-de959afab5042c44d78703050353cb5b20d442d2.tar.gz
rust-de959afab5042c44d78703050353cb5b20d442d2.zip
Handle anon lifetime arg being returned with named lifetime return type
When there's a lifetime mismatch between an argument with an anonymous
lifetime being returned in a method with a return type that has a named
lifetime, show specialized lifetime error pointing at argument with a
hint to give it an explicit lifetime matching the return type.

```
error[E0621]: explicit lifetime required in the type of `other`
  --> file2.rs:21:21
   |
17 |     fn bar(&self, other: Foo) -> Foo<'a> {
   |                   ----- consider changing the type of `other` to `Foo<'a>`
...
21 |                     other
   |                     ^^^^^ lifetime `'a` required
```

Follow up to #44124 and #42669.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions