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

Update E0033 to the new error format #35526

Merged
merged 3 commits into from
Aug 23, 2016
Merged

Update E0033 to the new error format #35526

merged 3 commits into from
Aug 23, 2016

Conversation

munyari
Copy link
Contributor

@munyari munyari commented Aug 8, 2016

Part of #35233

Addresses #35498
"r? @jonathandturner

@sophiajt
Copy link
Contributor

sophiajt commented Aug 8, 2016

Looks good.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 8, 2016

📌 Commit 40b2e51 has been approved by jonathandturner

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Aug 10, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 10, 2016
@sophiajt
Copy link
Contributor

sophiajt commented Aug 11, 2016

@bors r-

Looks like the test file may need another label. This might come from other PRs that have landed.

Line 16 on the unit test needs one more NOTE:

unexpected errors (from JSON output): [
    Error {
        line_num: 16,
        kind: Some(
            Note
        ),
        msg: "the trait `SomeTrait` cannot be made into an object"
    }
]

@munyari
Copy link
Contributor Author

munyari commented Aug 11, 2016

@jonathandturner looks like it comes from my other PR actually, because it doesn't show up in the unit tests of this branch rebased on master. I added the note

@sophiajt
Copy link
Contributor

Thanks. Let's see if that did it.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 11, 2016

📌 Commit 80beeb3 has been approved by jonathandturner

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 13, 2016
eddyb added a commit to eddyb/rust that referenced this pull request Aug 14, 2016
@eddyb
Copy link
Member

eddyb commented Aug 14, 2016

@bors r- fails tidy

@@ -15,5 +15,10 @@ trait SomeTrait {
fn main() {
let trait_obj: &SomeTrait = SomeTrait; //~ ERROR E0425
//~^ ERROR E0038
let &invalid = trait_obj; //~ ERROR E0033
//~| method `foo` has no receiver
//~| NOTE the trait `SomeTrait` cannot be made into an object
Copy link
Member

Choose a reason for hiding this comment

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

Please move these to the left, indented under the erroring line, otherwise they're too wide (over 100 columns).

@munyari
Copy link
Contributor Author

munyari commented Aug 14, 2016

@eddyb just updated

//~^ ERROR E0038
let &invalid = trait_obj; //~ ERROR E0033
let trait_obj: &SomeTrait = SomeTrait;
//~ ERROR E0425
Copy link
Member

Choose a reason for hiding this comment

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

The ~^ needs to be on this line.

@munyari
Copy link
Contributor Author

munyari commented Aug 15, 2016

@eddyb just amended the previous commit

let trait_obj: &SomeTrait = SomeTrait;
//~^ ERROR E0425
//~| ERROR E0038
//~| method `foo` has no receiver
Copy link
Member

Choose a reason for hiding this comment

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

Does this actually work? I didn't think it worked without ERROR or NOTE.

@sophiajt
Copy link
Contributor

@munyari - can you update the unit test with @eddyb's suggestion? After that, I think we're good.

@munyari
Copy link
Contributor Author

munyari commented Aug 22, 2016

@jonathandturner @eddyb the tests seem to work on my end, and looks like it passed on Travis. Please tell me about any errors that you see

@eddyb
Copy link
Member

eddyb commented Aug 22, 2016

Well, I could find other tests using the same syntax, so it may just be something new (although I would've expected @jonathandturner to explain in that case. I believe it's the new error label).

@bors r=jonathandturner

@bors
Copy link
Contributor

bors commented Aug 22, 2016

📌 Commit a37e90a has been approved by jonathandturner

eddyb added a commit to eddyb/rust that referenced this pull request Aug 22, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 22, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 22, 2016
bors added a commit that referenced this pull request Aug 22, 2016
@bors bors merged commit a37e90a into rust-lang:master Aug 23, 2016
@munyari munyari deleted the e0033 branch August 23, 2016 04:21
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.

4 participants