Skip to content

Commit b3aba94

Browse files
committed
use code from bug report for regression test
1 parent a0c31b7 commit b3aba94

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

crates/ide-diagnostics/src/handlers/mutability_errors.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,18 +1178,20 @@ fn f() {
11781178
fn regression_15623() {
11791179
check_diagnostics(
11801180
r#"
1181+
//- minicore: fn
1182+
11811183
struct Foo;
11821184
11831185
impl Foo {
11841186
fn needs_mut(&mut self) {}
11851187
}
11861188
1187-
fn main() {
1188-
let mut foo = Foo;
1189-
|| {
1189+
fn foo(mut foo: Foo) {
1190+
let mut call_me = || {
11901191
let 0 = 1 else { return };
11911192
foo.needs_mut();
11921193
};
1194+
call_me();
11931195
}
11941196
"#,
11951197
);

0 commit comments

Comments
 (0)