rust/tests/ui/closures/2229_closure_analysis/issue-92724-needsdrop-query-cycle.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
299 B
Rust
Raw Normal View History

// ICEs if checking if there is a significant destructor causes a query cycle
// check-pass
#![warn(rust_2021_incompatible_closure_captures)]
pub struct Foo(Bar);
pub struct Bar(Baz);
pub struct Baz(Vec<Foo>);
impl Foo {
pub fn baz(self, v: Baz) -> Baz {
(|| v)()
}
}
fn main() {}