Fallback to 'has type' error messages rather than 'lifetime appears in type'.

This commit is contained in:
David Wood 2018-08-06 23:09:36 +02:00
parent 82b48277a2
commit 255ead5faa
No known key found for this signature in database
GPG key ID: 01760B4F9F53F154
2 changed files with 10 additions and 26 deletions

View file

@ -4,7 +4,7 @@ error: unsatisfied lifetime constraints
LL | fn take_bar(&mut self, b: Bar<'_>) {
| --------- -- let's call this `'1`
| |
| lifetime `'2` appears in this type
| has type `&mut Foo<'_, '2>`
LL | self.y = b.z
| ^^^^^^^^^^^^ requires that `'1` must outlive `'2`