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

Fix the span for discriminators in non-C-like enums #17415

Merged
merged 1 commit into from Sep 21, 2014
Merged

Fix the span for discriminators in non-C-like enums #17415

merged 1 commit into from Sep 21, 2014

Conversation

ghost
Copy link

@ghost ghost commented Sep 20, 2014

Fixes #17383.

// except according to those terms.

enum X {
A = b'a', //~ ERROR discriminator values can only be used with a c-like enum
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you modify the test to make the b'a' token on its own line? Something like:

enum X {
    A =
        b'a' //~ ERROR: ...
    ,
    B(int)
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely! Done.

bors added a commit that referenced this pull request Sep 21, 2014
@bors bors closed this Sep 21, 2014
@bors bors merged commit 3514737 into rust-lang:master Sep 21, 2014
@ghost ghost deleted the issue-17383 branch October 2, 2014 20:24
lnicola pushed a commit to lnicola/rust that referenced this pull request Jun 23, 2024
…eykril

fix: Only show unlinked-file diagnostic on first line during startup

This partially reverts rust-lang#17350, based on the feedback in rust-lang#17397.

If we don't have an autofix, it's more annoying to highlight the whole file. This autofix heuristic fixes the diagnostic being overwhelming during startup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"discriminator values can only be used with a c-like enum" wrong span
2 participants