]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/issue-102089-multiple-opaque-cast.rs
Rollup merge of #107061 - compiler-errors:new-solver-new-candidates-3, r=lcnr
[rust.git] / tests / ui / closures / issue-102089-multiple-opaque-cast.rs
1 // edition:2021
2 // check-pass
3
4 pub struct Example<'a, T> {
5   a: T,
6   b: &'a T,
7 }
8
9 impl<'a, T> Example<'a, T> {
10   pub fn error_trying_to_destructure_self_in_closure(self) {
11     let closure = || {
12       let Self { a, b } = self;
13     };
14   }
15 }
16
17 fn main() {}