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 9d0ccf0 commit a77789eCopy full SHA for a77789e
crates/ide-diagnostics/src/handlers/mutability_errors.rs
@@ -1170,6 +1170,27 @@ fn f() {
1170
loop {}
1171
for _ in 0..2 {}
1172
}
1173
+"#,
1174
+ );
1175
+ }
1176
+
1177
+ #[test]
1178
+ fn regression_15623() {
1179
+ check_diagnostics(
1180
+ r#"
1181
+struct Foo;
1182
1183
+impl Foo {
1184
+ fn needs_mut(&mut self) {}
1185
+}
1186
1187
+fn main() {
1188
+ let mut foo = Foo;
1189
+ || {
1190
+ let 0 = 1 else { return };
1191
+ foo.needs_mut();
1192
+ };
1193
1194
"#,
1195
);
1196
0 commit comments