regression test

This commit is contained in:
jDomantas 2023-09-17 11:54:42 +03:00
parent 9d0ccf01a1
commit a77789e7aa

View File

@ -1170,6 +1170,27 @@ fn f() {
loop {}
for _ in 0..2 {}
}
"#,
);
}
#[test]
fn regression_15623() {
check_diagnostics(
r#"
struct Foo;
impl Foo {
fn needs_mut(&mut self) {}
}
fn main() {
let mut foo = Foo;
|| {
let 0 = 1 else { return };
foo.needs_mut();
};
}
"#,
);
}