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

E0463 needs to be updated to new format #35934

Closed
sophiajt opened this issue Aug 23, 2016 · 6 comments
Closed

E0463 needs to be updated to new format #35934

sophiajt opened this issue Aug 23, 2016 · 6 comments
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.

Comments

@sophiajt
Copy link
Contributor

From: src/test/compile-fail/E0463.rs

E0463 needs a span_label, updating it from:

error[E0463]: can't find crate for `cookie_monster`
  --> src/test/compile-fail/E0463.rs:12:11
   |
12 | #![plugin(cookie_monster)] //~ ERROR E0463
   |           ^^^^^^^^^^^^^^

To:

error[E0463]: can't find crate for `cookie_monster`
  --> src/test/compile-fail/E0463.rs:12:11
   |
12 | #![plugin(cookie_monster)] //~ ERROR E0463
   |           ^^^^^^^^^^^^^^ can't find crate
@bstrie bstrie added the A-diagnostics Area: Messages for errors, warnings, and lints label Aug 24, 2016
@paulfanelli
Copy link
Contributor

I'll take this one.

@brson brson added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Aug 26, 2016
@paulfanelli
Copy link
Contributor

I've fixed this, but when I ran the unit tests after making my changes, all the tests passed. I was expecting the unit tests related to E0463 to fail. What this suggests to me is that there are no unit tests for E0463? How should I proceed?

@sophiajt
Copy link
Contributor Author

@paulfanelli - yeah, there's a quirk in the unit test system where it will only start testing the labels if you add at least one NOTE to the test. You can read up on it in the Extra Credit section of the blog post

@paulfanelli
Copy link
Contributor

Ok, I added a NOTE with bogus data and got the unit test for E0463 to fail. Then I put the correct NOTE in and it passed the test. But...I coded it 2 different ways and they both worked. Not sure what the best practice is?

the 1st way I coded it is (adding the NOTE separately; leaving the original ERROR alone):

#![feature(plugin)]
#![plugin(cookie_monster)] //~ ERROR E0463
//~^ NOTE can't find crate
extern crate cake_is_a_lie;

fn main() {
}

the 2nd way is (putting the ERROR and NOTE together with the ^ and |:

#![feature(plugin)]
#![plugin(cookie_monster)]
//^ ERROR E0463
//
| NOTE can't find crate
extern crate cake_is_a_lie;

fn main() {
}

@sophiajt
Copy link
Contributor Author

Those are both correct. The testing system has been around a little while so, inevitably, there are a couple ways to do things.

My preference is the second of the two as, imho, it looks a little better.

@GuillaumeGomez
Copy link
Member

'|' comes in when '^' has already be called on a same span IIRC.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 29, 2016
… r=jonathandturner

Update E0463 error message to new format

Fixes rust-lang#35934 as part of rust-lang#35233

r? @jonathandturner
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 30, 2016
… r=jonathandturner

Update E0463 error message to new format

Fixes rust-lang#35934 as part of rust-lang#35233

r? @jonathandturner
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 30, 2016
… r=jonathandturner

Update E0463 error message to new format

Fixes rust-lang#35934 as part of rust-lang#35233

r? @jonathandturner
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.
Projects
None yet
Development

No branches or pull requests

5 participants