diff options
| author | bors <bors@rust-lang.org> | 2018-07-27 13:01:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-07-27 13:01:48 +0000 |
| commit | b6cbc1e1479d1ac5e66565d3b3e2cc54f767d2a0 (patch) | |
| tree | 5f1edc4fd5141ec935c2155ea94b4a6a2c4d99b3 /src/test/ui/impl-trait | |
| parent | 6998b369faf3daf849f538d636bac9eda659fa5a (diff) | |
| parent | 2e4224a9983cacf6ef1a2787c0084d743abb27e1 (diff) | |
| download | rust-b6cbc1e1479d1ac5e66565d3b3e2cc54f767d2a0.tar.gz rust-b6cbc1e1479d1ac5e66565d3b3e2cc54f767d2a0.zip | |
Auto merge of #52648 - davidtwco:issue-52533, r=nikomatsakis
[nll] improve the "fully elaborated type" case in region errors Fixes #52533. r? @nikomatsakis
Diffstat (limited to 'src/test/ui/impl-trait')
| -rw-r--r-- | src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr b/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr index c6f8d2e519c..bbc63e6feca 100644 --- a/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr +++ b/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr @@ -10,21 +10,19 @@ warning: not reporting region error due to nll LL | self.x.iter().map(|a| a.0) | ^^^^ -error: borrowed data escapes outside of closure +error: unsatisfied lifetime constraints --> $DIR/static-return-lifetime-infered.rs:17:9 | LL | fn iter_values_anon(&self) -> impl Iterator<Item=u32> { - | ----- `self` is a reference that is only valid in the closure body + | - let's call the lifetime of this reference `'1` LL | self.x.iter().map(|a| a.0) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `self` escapes the closure body here + | ^^^^^^^^^^^^^ requires that `'1` must outlive `'static` -error: borrowed data escapes outside of closure +error: unsatisfied lifetime constraints --> $DIR/static-return-lifetime-infered.rs:21:9 | -LL | fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> { - | -------- `self` is a reference that is only valid in the closure body LL | self.x.iter().map(|a| a.0) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `self` escapes the closure body here + | ^^^^^^^^^^^^^ requires that `'a` must outlive `'static` error: aborting due to 2 previous errors |
