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

Reduce use of span.with_lo(span.lo() + BytePos(1)) in librustc_parse/parser/mod.rs #68783

Closed
JohnTitor opened this issue Feb 2, 2020 · 1 comment · Fixed by #68845
Closed
Labels
A-parser Area: The parsing of Rust source code to an AST C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@JohnTitor
Copy link
Member

span.with_lo(span.lo() + BytePos(1)) may cause an ICE if span points strange character so we should use next_point instead. But next_point isn't actually equivalent with span.with_lo(span.lo() + BytePos(1)) so it breaks some spans in current diagnostics. We should find out the cause and reduce use of them.

See context: #68735 (comment)

@JohnTitor JohnTitor added A-parser Area: The parsing of Rust source code to an AST C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 2, 2020
@dwrensha
Copy link
Contributor

dwrensha commented Feb 5, 2020

I think #68845 should fix this.

@bors bors closed this as completed in ec24833 Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser Area: The parsing of Rust source code to an AST C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants