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.
2 parents 90b3db1 + 8121727 commit f0b496cCopy full SHA for f0b496c
crates/ide-diagnostics/src/handlers/mutability_errors.rs
@@ -1302,6 +1302,22 @@ fn main() {
1302
let mut var = 1;
1303
let mut func = || (var,) = (2,);
1304
func();
1305
+}
1306
+ "#,
1307
+ );
1308
+ }
1309
+
1310
+ #[test]
1311
+ fn regression_20662() {
1312
+ check_diagnostics(
1313
+ r#"
1314
+//- minicore: index
1315
+pub trait A: core::ops::IndexMut<usize> {
1316
+ type T: A;
1317
1318
1319
+fn func(a: &mut impl A, b: &mut [i32]) {
1320
+ b[0] += 1;
1321
}
1322
"#,
1323
);
0 commit comments