Uh oh!
There was an error while loading. Please reload this page.
Fix bad error message with ::< in types - #36206
Conversation
rust-highfive
commented
Sep 2, 2016
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pnkfelix (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. |
pnkfelix
commented
Sep 22, 2016
(travis failure seemed spurious; i'm giving it another shot and also starting a review.) |
There was a problem hiding this comment.
stylistically I don't think we put line breaks between the if and the condition expression in cases like this.
There was a problem hiding this comment.
stylistically I think we tend to separate the arrow (the ^ and the |) and the ERROR/WARN by putting a space between them.
pnkfelix
commented
Sep 22, 2016
These changes seem fine to me. I had stylistic nits that would be nice to address. |
pnkfelix
commented
Sep 22, 2016
In other words, r=me once nits are addressed. |
mcarton
commented
Sep 22, 2016
Addressed nits. |
@pnkfelix Any reason this hasn't been merged yet? I've gotten this error a few times, and this change would make the solution much clearer. |
pnkfelix
commented
Oct 26, 2016
@bors r+ rollup |
bors
commented
Oct 26, 2016
📌 Commit 17bbcac has been approved by |
GuillaumeGomez
commented
Oct 26, 2016
It seems your code fails: Please update your code and I'll re-r+ it. @bors: r- |
mcarton
commented
Oct 27, 2016
@GuillaumeGomez done. Thanks for pointing that out, that field was renamed in #36470. |
pnkfelix
commented
Oct 27, 2016
@bors r+ rollup |
bors
commented
Oct 27, 2016
📌 Commit 368f435 has been approved by |
pnkfelix
commented
Oct 28, 2016
@bors r- |
pnkfelix
commented
Oct 28, 2016
It has been pointed out that this commit series needs revision. It should be rebased (to remove the merge commit) and squashed into a smaller series of commits, e.g. One commit maybe |
mcarton
commented
Oct 28, 2016
No problem, done. |
pnkfelix
commented
Oct 28, 2016
Great, thanks for your patience and perseverance @mcarton |
pnkfelix
commented
Oct 28, 2016
@bors r+ rollup |
bors
commented
Oct 28, 2016
📌 Commit f7cc6dc has been approved by |
Fix bad error message with `::<` in types Fixrust-lang#36116. Before: ```rust error: expected identifier, found `<` --> src/test/compile-fail/issue-36116.rs:16:52 | 16 | let f = Some(Foo { _a: 42 }).map(|a| a as Foo::<i32>); | ^ error: chained comparison operators require parentheses --> src/test/compile-fail/issue-36116.rs:16:52 | 16 | let f = Some(Foo { _a: 42 }).map(|a| a as Foo::<i32>); | ^^^^^^ | = help: use `::<...>` instead of `<...>` if you meant to specify type arguments error: expected expression, found `)` --> src/test/compile-fail/issue-36116.rs:16:57 | 16 | let f = Some(Foo { _a: 42 }).map(|a| a as Foo::<i32>); | ^ error: expected identifier, found `<` --> src/test/compile-fail/issue-36116.rs:20:17 | 20 | let g: Foo::<i32> = Foo { _a: 42 }; | ^ error: aborting due to 5 previous errors ``` After: ```rust error: unexpected token: `::` --> src/test/compile-fail/issue-36116.rs:16:50 | 16 | let f = Some(Foo { _a: 42 }).map(|a| a as Foo::<i32>); | ^^ | = help: use `<...>` instead of `::<...>` if you meant to specify type arguments error: unexpected token: `::` --> src/test/compile-fail/issue-36116.rs:20:15 | 20 | let g: Foo::<i32> = Foo { _a: 42 }; | ^^ | = help: use `<...>` instead of `::<...>` if you meant to specify type arguments error: aborting due to 2 previous errors ```
Fix#36116.
Before:
After: