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

E05XX odyssey #43726

Merged

Conversation

zackmdavis
Copy link
Member

chipping away at the surface exposed by #43709

r? @GuillaumeGomez

Copy link
Member

@GuillaumeGomez GuillaumeGomez left a comment

Choose a reason for hiding this comment

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

A few things to change but globally it's good.

"##,

E0571: r##"
The `break` statement can take an argument (which will be the value of the loop
Copy link
Member

Choose a reason for hiding this comment

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

A long error explanation is supposed to start by a short summary of the error. The error explanation comes just after the erroneous code example and just before the fix.

E0552: r##"
A unrecognized representation attribute was used.

You can use a `repr` attribute to tell the compiler how you want a struct or
Copy link
Member

Choose a reason for hiding this comment

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

The explanation is supposed to be after the erroneous code example.


Example of erroneous code (on a stable compiler):

```ignore (depends on release channel)
Copy link
Member

Choose a reason for hiding this comment

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

Just ignore please.

Copy link
Member

Choose a reason for hiding this comment

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

@GuillaumeGomez Just writing ignore without explanation will cause tidy failure. --explain will strip them out though.

Copy link
Member

Choose a reason for hiding this comment

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

Oh that's strange.

"##,

E0557: r##"
A feature attribute for a removed feature was used.
Copy link
Member

Choose a reason for hiding this comment

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

Seems a bit complicated when formulated this way.

@@ -1602,7 +1602,7 @@ fn maybe_stage_features(span_handler: &Handler, krate: &ast::Crate,
if attr.check_name("feature") {
let release_channel = option_env!("CFG_RELEASE_CHANNEL").unwrap_or("(unknown)");
span_err!(span_handler, attr.span, E0554,
"#[feature] may not be used on the {} release channel",
"#![feature] may not be used on the {} release channel",
Copy link
Member

Choose a reason for hiding this comment

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

Why this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

@arielb1 arielb1 added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 8, 2017
It's more pleasing to use the inner-attribute syntax (`#!` rather than
`#`) in the error message, as that is how `feature` attributes in
particular will be declared (as they apply to the entire crate).
@zackmdavis zackmdavis force-pushed the extended_information_summer_block_party branch from 6e43cfd to 116bf07 Compare August 9, 2017 08:35
@zackmdavis
Copy link
Member Author

(updated)

@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+

@bors
Copy link
Contributor

bors commented Aug 9, 2017

📌 Commit 116bf07 has been approved by GuillaumeGomez

@bors
Copy link
Contributor

bors commented Aug 9, 2017

⌛ Testing commit 116bf07 with merge b2bf163...

bors added a commit that referenced this pull request Aug 9, 2017
…arty, r=GuillaumeGomez

E05XX odyssey

chipping away at the surface exposed by #43709

r? @GuillaumeGomez
@bors
Copy link
Contributor

bors commented Aug 9, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: GuillaumeGomez
Pushing b2bf163 to master...

@bors bors merged commit 116bf07 into rust-lang:master Aug 9, 2017
@zackmdavis zackmdavis deleted the extended_information_summer_block_party branch January 13, 2018 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants