]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/issue-92724-needsdrop-query-cycle.rs
Rollup merge of #106321 - compiler-errors:delayed-bug-backtrace, r=Nilstrieb
[rust.git] / tests / ui / closures / 2229_closure_analysis / issue-92724-needsdrop-query-cycle.rs
1 // ICEs if checking if there is a significant destructor causes a query cycle
2 // check-pass
3
4 #![warn(rust_2021_incompatible_closure_captures)]
5 pub struct Foo(Bar);
6 pub struct Bar(Baz);
7 pub struct Baz(Vec<Foo>);
8
9 impl Foo {
10     pub fn baz(self, v: Baz) -> Baz {
11         (|| v)()
12     }
13 }
14 fn main() {}