-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Implement normalize_lexically
#134696
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
base: master
Are you sure you want to change the base?
Implement normalize_lexically
#134696
Conversation
rustbot has assigned @workingjubilee. Use |
c08079c
to
8a3fb66
Compare
|
||
for component in iter { | ||
match component { | ||
Component::RootDir | Component::Prefix(_) => return Err(NormalizeError), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't Component::RootDir
be unreachable? (We just checked it and skipped it.)
Component::RootDir | Component::Prefix(_) => return Err(NormalizeError), | ||
Component::CurDir => continue, | ||
Component::ParentDir => { | ||
if lexical.as_os_str().len() == root { | ||
return Err(NormalizeError); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also a "should never happen" case, isn't it?
☔ The latest upstream changes (presumably #136533) made this pull request unmergeable. Please resolve the merge conflicts. |
Hmm. This wasn't supposed to get frozen on those two questions, so I'm just going to rebase this and approve it. If I think we maybe should call |
8a3fb66
to
2955213
Compare
The job Click to see the possible cause of the failure (guessed by this bot)
|
ugh, the move of the tests breaks them because they relied on a struct expr |
Implements #134694
This is, I think, the most straightforward implementation I could do, which will hopefully more easily allow experimentation if we decide to change the design here.