diff options
| author | Michael Goulet <michael@errs.io> | 2024-11-24 22:39:19 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-11-24 23:11:49 +0000 |
| commit | 15dff274d07621283b38e4ca0008f7e6145c2519 (patch) | |
| tree | 390791cd81c4980eeecd34185fae56c58db72bdc /tests/ui/impl-trait/precise-capturing | |
| parent | 15b663e684d0acf1b4299b7ad6b4f4ab106395bd (diff) | |
| download | rust-15dff274d07621283b38e4ca0008f7e6145c2519.tar.gz rust-15dff274d07621283b38e4ca0008f7e6145c2519.zip | |
Actually use placeholder regions for trait method late bound regions in collect_return_position_impl_trait_in_trait_tys
Diffstat (limited to 'tests/ui/impl-trait/precise-capturing')
| -rw-r--r-- | tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.stderr | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.stderr b/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.stderr index e1856b92910..360f0d7e7f3 100644 --- a/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.stderr +++ b/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.stderr @@ -1,10 +1,11 @@ error: return type captures more lifetimes than trait definition --> $DIR/rpitit-impl-captures-too-much.rs:10:39 | +LL | fn hello(self_: Invariant<'_>) -> impl Sized + use<Self>; + | -- this lifetime was captured +... LL | fn hello(self_: Invariant<'_>) -> impl Sized + use<'_> {} - | -- ^^^^^^^^^^^^^^^^^^^^ - | | - | this lifetime was captured + | ^^^^^^^^^^^^^^^^^^^^ | note: hidden type must only reference lifetimes captured by this impl trait --> $DIR/rpitit-impl-captures-too-much.rs:6:39 |
