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

Raw identifier keywords are sometimes silently accepted in paths #63882

Closed
petrochenkov opened this issue Aug 25, 2019 · 3 comments · Fixed by #70000
Closed

Raw identifier keywords are sometimes silently accepted in paths #63882

petrochenkov opened this issue Aug 25, 2019 · 3 comments · Fixed by #70000
Labels
A-resolve Area: Name resolution C-bug Category: This is a bug. regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@petrochenkov
Copy link
Contributor

Example:

type A = crate::r#break; // No error (?!)

fn main() {}

Found by crater run (https://crater-reports.s3.amazonaws.com/beta-1.38-1/beta-2019-08-13/gh/xi-frontend.xi-term/log.txt) when visibility resolution switched to a different algorithm (early resolution), which doesn't have this problem.

@petrochenkov petrochenkov added A-resolve Area: Name resolution C-bug Category: This is a bug. labels Aug 25, 2019
@jonas-schievink jonas-schievink added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 25, 2019
@petrochenkov
Copy link
Contributor Author

This is a regression from Rust 1.33.

@petrochenkov petrochenkov added the regression-from-stable-to-stable Performance or correctness regression from one stable version to another. label Aug 25, 2019
@petrochenkov petrochenkov self-assigned this Mar 14, 2020
@petrochenkov
Copy link
Contributor Author

Diagnostic improvements strike again:

} else if !ident.is_reserved() {
(format!("maybe a missing crate `{}`?", ident), None)
} else {
// the parser will already have complained about the keyword being used
return PathResult::NonModule(PartialRes::new(Res::Err));
}

@petrochenkov
Copy link
Contributor Author

Fixed in #70000.

@petrochenkov petrochenkov removed their assignment Mar 14, 2020
Centril added a commit to Centril/rust that referenced this issue Mar 16, 2020
resolve: Fix regression in resolution of raw keywords in paths

Fixes rust-lang#63882.
Centril added a commit to Centril/rust that referenced this issue Mar 16, 2020
resolve: Fix regression in resolution of raw keywords in paths

Fixes rust-lang#63882.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Mar 17, 2020
resolve: Fix regression in resolution of raw keywords in paths

Fixes rust-lang#63882.
@bors bors closed this as completed in 3d25622 Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Name resolution C-bug Category: This is a bug. regression-from-stable-to-stable Performance or correctness regression from one stable version to another. 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