use code from bug report for regression test

This commit is contained in:
jDomantas 2023-09-17 16:52:32 +03:00
parent a0c31b73d8
commit b3aba94cbd

View File

@ -1178,18 +1178,20 @@ fn f() {
fn regression_15623() { fn regression_15623() {
check_diagnostics( check_diagnostics(
r#" r#"
//- minicore: fn
struct Foo; struct Foo;
impl Foo { impl Foo {
fn needs_mut(&mut self) {} fn needs_mut(&mut self) {}
} }
fn main() { fn foo(mut foo: Foo) {
let mut foo = Foo; let mut call_me = || {
|| {
let 0 = 1 else { return }; let 0 = 1 else { return };
foo.needs_mut(); foo.needs_mut();
}; };
call_me();
} }
"#, "#,
); );