mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Skip mutable diagnostics on synthetic bindings
This commit is contained in:
parent
6d333e587d
commit
d8b970f1fc
2 changed files with 21 additions and 0 deletions
|
@ -1091,6 +1091,19 @@ fn main() {
|
|||
//^^^^^ 💡 weak: variable does not need to be mutable
|
||||
f(x);
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn regression_15099() {
|
||||
check_diagnostics(
|
||||
r#"
|
||||
//- minicore: iterator, range
|
||||
fn f() {
|
||||
loop {}
|
||||
for _ in 0..2 {}
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue