regression test
This commit is contained in:
parent
9d0ccf01a1
commit
a77789e7aa
@ -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();
|
||||
};
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user