Skip to content
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

"consider removing this semicolon" note appears before the corresponding error #13279

Closed
huonw opened this issue Apr 3, 2014 · 1 comment
Closed
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

Comments

@huonw
Copy link
Member

huonw commented Apr 3, 2014

fn foo() -> int { 1; }
fn main() {}

emits an error like

<anon>:11:28: 11:28 note: consider removing this semicolon:
<anon>:11         fn foo() -> int { 1; }
                                     ^
<anon>:11:9: 11:31 error: not all control paths return a value
<anon>:11         fn foo() -> int { 1; }
                  ^~~~~~~~~~~~~~~~~~~~~~

This could be mildly confusing when there are multiple error messages, and so someone may misinterpret some note as being attached to a previous error.

@huonw
Copy link
Member Author

huonw commented Jul 2, 2014

Tagging as mentor: ping me here, by email (in my profile) or on IRC (huon) if you need help.

bors added a commit that referenced this issue Jul 5, 2014
…alton

Moved note after error to reduce confusion when the pair appears in the
middle of other errors. Closes #13279.
@bors bors closed this as completed in f37e202 Jul 5, 2014
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 E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant