-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Beautify doctest path #130643
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?
Beautify doctest path #130643
Conversation
This PR modifies cc @jieyouxu |
I'd rather not implement this in a way that only works with doctests. We can see the same problem with the regular compiler. Can't this be implemented in a way that applies everywhere? |
for component in path.components().filter(|c| !matches!(c, Component::CurDir)) { | ||
if matches!(component, Component::ParentDir) { | ||
if beautiful_path.parent().is_none() { | ||
return path.canonicalize().unwrap_or_else(|_| path.to_path_buf()); |
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.
Note for myself: remove this canonicalize
.
I suppose I can. I'll move my |
Fixes #130626.
r? @notriddle