You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An error in the source code causes the correct compile error, but rustc then emits an additional compile error in unrelated, completely correct code.
I tried this code:
fn main() {
for xx in 0..11 { print!("{}", xx as f64) };
kk = 666 // Error here triggers inference error in previous line
}
I expected to see this happen:
error[E0425]: cannot find value `kk` in this scope
--> <anon>:3:5
|
3 | kk = 666
| ^^ did you mean `Ok`?
But in addition, this happened too:
error: non-scalar cast: `{integer}` as `f64`
--> <anon>:2:36
|
2 | for xx in 0..11 { print!("{}", xx as f64) };
| ^^^^^^^^^
If the line containing the legitimate error is removed, the unrelated code compiles correctly as expected, and the additional, incorrect error will no longer show up.
The text was updated successfully, but these errors were encountered:
An error in the source code causes the correct compile error, but rustc then emits an additional compile error in unrelated, completely correct code.
I tried this code:
fn main() {
for xx in 0..11 { print!("{}", xx as f64) };
kk = 666 // Error here triggers inference error in previous line
}
I expected to see this happen:
But in addition, this happened too:
If the line containing the legitimate error is removed, the unrelated code compiles correctly as expected, and the additional, incorrect error will no longer show up.
The text was updated successfully, but these errors were encountered: