We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0c31b7 commit b3aba94Copy full SHA for b3aba94
crates/ide-diagnostics/src/handlers/mutability_errors.rs
@@ -1178,18 +1178,20 @@ fn f() {
1178
fn regression_15623() {
1179
check_diagnostics(
1180
r#"
1181
+//- minicore: fn
1182
+
1183
struct Foo;
1184
1185
impl Foo {
1186
fn needs_mut(&mut self) {}
1187
}
1188
-fn main() {
- let mut foo = Foo;
1189
- || {
+fn foo(mut foo: Foo) {
1190
+ let mut call_me = || {
1191
let 0 = 1 else { return };
1192
foo.needs_mut();
1193
};
1194
+ call_me();
1195
1196
"#,
1197
);
0 commit comments