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

Incorrect error note for empty implementations #9580

Closed
SiegeLord opened this issue Sep 28, 2013 · 1 comment
Closed

Incorrect error note for empty implementations #9580

SiegeLord opened this issue Sep 28, 2013 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@SiegeLord
Copy link
Contributor

impl A for B;

gives this error:

test.rs:1:12: 1:13 error: obsolete syntax: empty implementation
test.rs:1 impl A for B;
                      ^
note: instead of `impl A;`, write `impl A {}`
error: aborting due to previous error

The note is talking about a different construct. It could use a more generic language to refer to trait implementations and non-trait implementations. I also question handling this via the obsolete syntax pathway, as it seems to leak historical details that are not too relevant for a Rust user.

huonw added a commit to huonw/rust that referenced this issue Jan 31, 2014
This is has been obsolete for quite a while now (including a release),
so removing the special handling seems fine. (The error message is quite
good still anyway.)

Fixes rust-lang#9580.
@huonw
Copy link
Member

huonw commented Feb 1, 2014

triage: I've just removed the special handling in #11966, so it's now a normal syntax error to write impl A for B;. (Will be closed when that lands.)

@huonw huonw closed this as completed in a9f73b5 Feb 1, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Oct 6, 2022
…r=llogiq

let `upper_case_acronyms` check the enum name

Signed-off-by: TennyZhuang <zty0826@gmail.com>

Fix rust-lang#9579

changelog: [`upper_case_acronyms`]: check the enum name
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
Projects
None yet
Development

No branches or pull requests

2 participants