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 error message for E0243 and E0244 #35419

Merged
merged 1 commit into from
Aug 7, 2016
Merged

Conversation

Keats
Copy link

@Keats Keats commented Aug 6, 2016

Fixes #35389 and #35390 as part of #35233.

r? @jonathandturner

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jonathandturner (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@@ -18,6 +18,7 @@ fn main()
vfnfer.push(box h);
println!("{:?}",(vfnfer[0] as Fn)(3));
//~^ ERROR the precise format of `Fn`-family traits'
//~| ERROR wrong number of type arguments: expected 1, found 0
//~| ERROR E0243
//~| NOTE expected 1 type arguments, found 0
Copy link
Author

Choose a reason for hiding this comment

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

this errors:

unexpected errors (from JSON output): [
    Error {
        line_num: 19,
        kind: Some(
            Note
        ),
        msg: "in this expansion of println!"
    },
    Error {
        line_num: 19,
        kind: Some(
            Note
        ),
        msg: "in this expansion of println!"
    },
    Error {
        line_num: 19,
        kind: Some(
            Note
        ),
        msg: "in this expansion of println!"
    },
    Error {
        line_num: 19,
        kind: Some(
            Note
        ),
        msg: "in this expansion of println!"
    }
]

Remove the note make the test pass. Any idea?

Copy link
Author

Choose a reason for hiding this comment

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

according to irc, it's because once one NOTE is there, they must all be accounted for, should I remove mine or add the 4 missing?

Copy link
Contributor

Choose a reason for hiding this comment

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

Right. For the time being, would you mind adding the 4 missing ones? We'll probably do another pass later on that helps clean up macro errors, but for now we'll need to test for them.

@Keats
Copy link
Author

Keats commented Aug 6, 2016

Updated

@sophiajt
Copy link
Contributor

sophiajt commented Aug 6, 2016

Looks good!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 6, 2016

📌 Commit 24ddca0 has been approved by jonathandturner

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 6, 2016
bors added a commit that referenced this pull request Aug 6, 2016
Rollup of 9 pull requests

- Successful merges: #35362, #35393, #35394, #35402, #35410, #35411, #35413, #35419, #35421
- Failed merges: #35395, #35415
@sophiajt
Copy link
Contributor

sophiajt commented Aug 6, 2016

@bors r-

Looks like you missed a couple, both of them in src/test/compile-fail/typeck-builtin-bound-type-parameters.rs on line 23 and 27:

unexpected errors (from JSON output): [
    Error {
        line_num: 23,
        kind: Some(
            Note
        ),
        msg: "unexpected lifetime parameter"
    },
    Error {
        line_num: 27,
        kind: Some(
            Note
        ),
        msg: "unexpected lifetime parameter"
    }
]

@Keats
Copy link
Author

Keats commented Aug 7, 2016

Had to rebase to see the errors, anyway fixed

@sophiajt
Copy link
Contributor

sophiajt commented Aug 7, 2016

@Keats - yeah I figured that might be the case. Thanks for updating.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 7, 2016

📌 Commit 02f3609 has been approved by jonathandturner

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 7, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 7, 2016
bors added a commit that referenced this pull request Aug 7, 2016
@bors bors merged commit 02f3609 into rust-lang:master Aug 7, 2016
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