-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect error message location #70082
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
@rustbot modify labels: +A-diagnostics +C-bug +D-incorrect (someone other than the issue creator do this?) |
rustbot
added
A-diagnostics
Area: Messages for errors, warnings, and lints
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
labels
Mar 17, 2020
jonas-schievink
added
the
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
label
Mar 17, 2020
More minimal repro: fn main() {
|_: f64| {};
let _: f64 = 0.0 * 0.into();
} The closure just needs to be exist anywhere inside fn main() {
|_: f64| -> f64 {
0.0 * 0.into()
};
} Edit: this triggers the same issue: fn f() {
|_| 0;
0 * 0.into();
} |
This is essentially the same issue as #69455. |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Apr 26, 2023
…=compiler-errors diagnostics: add test case for already-solved issue Fixes rust-lang#70082
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Apr 26, 2023
…=compiler-errors diagnostics: add test case for already-solved issue Fixes rust-lang#70082
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
(playground)
The error message:
I expected to see this happen: The error is reported on the line for
y
.Instead, this happened: The error is reported for the closure…
Meta
Nighty, Beta and Stable affected.
The text was updated successfully, but these errors were encountered: