diff options
| author | bors <bors@rust-lang.org> | 2023-01-06 18:15:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-06 18:15:56 +0000 |
| commit | 0fb8b72ce49997d60a631e921d2cf5be9ca229e6 (patch) | |
| tree | c56824419fa9e82b7a13f357dfd58ce7765248ba /src/test | |
| parent | afe8c4537c9009a251a31e8f022b7795fc305d4f (diff) | |
| parent | de1859fc324a323dfd0033d666c64f82ff2f130f (diff) | |
| download | rust-0fb8b72ce49997d60a631e921d2cf5be9ca229e6.tar.gz rust-0fb8b72ce49997d60a631e921d2cf5be9ca229e6.zip | |
Auto merge of #106501 - cjgillot:resolved-elided-apit, r=compiler-errors
Correct detection of elided lifetimes in impl-trait. Fixes https://github.com/rust-lang/rust/issues/106338 r? `@compiler-errors` cc `@pnkfelix`
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/suggestions/impl-trait-missing-lifetime-gated.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/impl-trait-missing-lifetime-gated.rs b/src/test/ui/suggestions/impl-trait-missing-lifetime-gated.rs index 9839e973bdf..a1a51c4814e 100644 --- a/src/test/ui/suggestions/impl-trait-missing-lifetime-gated.rs +++ b/src/test/ui/suggestions/impl-trait-missing-lifetime-gated.rs @@ -60,4 +60,9 @@ mod in_path { //~| ERROR missing lifetime specifier } +// This must not err, as the `&` actually resolves to `'a`. +fn resolved_anonymous<'a, T>(f: impl Fn(&'a str) -> &T) { + f("f") +} + fn main() {} |
