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

Suggest path separator for single-colon typos #68681

Merged
merged 5 commits into from
Feb 2, 2020

Conversation

bobrippling
Copy link
Contributor

This commit adds guidance for when a user means to type a path, but ends
up typing a single colon, such as <<Impl as T>:Ty>.

This change seemed pertinent as the current error message is
particularly misleading, emitting error: unmatched angle bracket,
despite the angle bracket being matched later on, leaving the user to
track down the typo'd colon.

This commit adds guidance for when a user means to type a path, but ends
up typing a single colon, such as `<<Impl as T>:Ty>`.

This change seemed pertinent as the current error message is
particularly misleading, emitting `error: unmatched angle bracket`,
despite the angle bracket being matched later on, leaving the user to
track down the typo'd colon.
@rust-highfive

This comment has been minimized.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 30, 2020
@Centril
Copy link
Contributor

Centril commented Jan 30, 2020

r? @Centril cc @estebank

@rust-highfive rust-highfive assigned Centril and unassigned varkor Jan 30, 2020
Copy link
Contributor

@Centril Centril left a comment

Choose a reason for hiding this comment

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

Thanks! This is looking good but there are some things I'd like to see improved:

src/librustc_parse/parser/path.rs Outdated Show resolved Hide resolved
src/librustc_parse/parser/path.rs Outdated Show resolved Hide resolved
src/librustc_parse/parser/path.rs Outdated Show resolved Hide resolved
src/librustc_parse/parser/path.rs Outdated Show resolved Hide resolved
@Centril Centril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 30, 2020
@rust-highfive

This comment has been minimized.

@bobrippling
Copy link
Contributor Author

Thanks for your reviews and guidance!

@Centril
Copy link
Contributor

Centril commented Feb 1, 2020

Looks really great, thanks! r=me when green.

@bobrippling
Copy link
Contributor Author

@bors r=Centril

Here we go. Thanks for a great first rust PR experience!

@bors
Copy link
Contributor

bors commented Feb 1, 2020

@bobrippling: 🔑 Insufficient privileges: Not in reviewers

@Centril
Copy link
Contributor

Centril commented Feb 1, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Feb 1, 2020

📌 Commit 07ee472 has been approved by Centril

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 1, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Feb 1, 2020
…ets, r=Centril

Suggest path separator for single-colon typos

This commit adds guidance for when a user means to type a path, but ends
up typing a single colon, such as `<<Impl as T>:Ty>`.

This change seemed pertinent as the current error message is
particularly misleading, emitting `error: unmatched angle bracket`,
despite the angle bracket being matched later on, leaving the user to
track down the typo'd colon.
bors added a commit that referenced this pull request Feb 1, 2020
Rollup of 7 pull requests

Successful merges:

 - #68460 (Use BufWriter for emitting MIR)
 - #68681 (Suggest path separator for single-colon typos)
 - #68688 ([docs] remind bug reporters to update nightly)
 - #68704 (Ignore `build` dir formatting)
 - #68727 (Remove a comment about pretty printer in formatting tests)
 - #68736 (Remove `Alloc` in favor of `AllocRef`)
 - #68740 (Do not suggest things named underscore)

Failed merges:

r? @ghost
@bors bors merged commit 07ee472 into rust-lang:master Feb 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants