about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2017-11-07 15:52:11 +0800
committerkennytm <kennytm@gmail.com>2017-11-07 22:40:15 +0800
commitd8238e431445a3b2075496a0e73753209df83f92 (patch)
tree2cb749c9c73543132527e4ecbd552e5343a9eb1b /src/test/incremental/thinlto
parent264bfc418cc6a0d3f2b695f58fc8aaaea7800a4f (diff)
parent805333b2b5602e421124787c7f944c4a7eacdb62 (diff)
downloadrust-d8238e431445a3b2075496a0e73753209df83f92.tar.gz
rust-d8238e431445a3b2075496a0e73753209df83f92.zip
Rollup merge of #45751 - estebank:issue-44684, r=nikomatsakis
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. Fix #44684.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions