Help suggests non-existent package std::os::ext::process::CommandExt#55007
Merged
bors merged 1 commit intorust-lang:masterfrom Oct 20, 2018
Merged
Help suggests non-existent package std::os::ext::process::CommandExt#55007bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
(rust_highfive has picked a reviewer for you, use r? to override) |
Contributor
|
Glad to see this getting fixed, @davidtwco =) |
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit e95472b has been approved by |
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Oct 18, 2018
Help suggests non-existent package std::os::ext::process::CommandExt Fixes rust-lang#39175.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
e95472b to
7b615f6
Compare
Member
Author
|
Updated the test to only run on unix - this change isn't platform dependent so I think it's fine to not have a corresponding test for a Windows-only extension trait. @bors r=petrochenkov |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
In order to output a path that could actually be imported (valid and visible), we need to handle re-exports correctly. For example, take `std::os::unix::process::CommandExt`, this trait is actually defined at `std::sys::unix::ext::process::CommandExt` (at time of writing). `std::os::unix` rexports the contents of `std::sys::unix::ext`. `std::sys` is private so the "true" path to `CommandExt` isn't accessible. In this case, the visible parent map will look something like this: (child) -> (parent) `std::sys::unix::ext::process::CommandExt` -> `std::sys::unix::ext::process` `std::sys::unix::ext::process` -> `std::sys::unix::ext` `std::sys::unix::ext` -> `std::os` This is correct, as the visible parent of `std::sys::unix::ext` is in fact `std::os`. When printing the path to `CommandExt` and looking at the current segment that corresponds to `std::sys::unix::ext`, we would normally print `ext` and then go to the parent - resulting in a mangled path like `std::os::ext::process::CommandExt`. Instead, we must detect that there was a re-export and instead print `unix` (which is the name `std::sys::unix::ext` was re-exported as in `std::os`).
7b615f6 to
4334aaa
Compare
Member
Author
|
Updated the test again so it only runs on platforms that other tests using @bors r=petrochenkov |
Collaborator
|
📌 Commit 4334aaa has been approved by |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Member
Author
|
@bors retry |
Collaborator
bors
added a commit
that referenced
this pull request
Oct 20, 2018
Help suggests non-existent package std::os::ext::process::CommandExt Fixes #39175.
Collaborator
|
☀️ Test successful - status-appveyor, status-travis |
davidtwco
added a commit
to davidtwco/rust
that referenced
this pull request
Jan 21, 2019
This commit extends previous work in rust-lang#55007 where the name from the visible parent was used for modules. Now, we also print the name from the visible parent for types.
Centril
added a commit
to Centril/rust
that referenced
this pull request
Jan 25, 2019
Print visible name for types as well as modules. Fixes rust-lang#56943 and fixes rust-lang#57713. This commit extends previous work in rust-lang#55007 where the name from the visible parent was used for modules. Now, we also print the name from the visible parent for types. r? @estebank
VardhanThigle
pushed a commit
to jethrogb/rust
that referenced
this pull request
Jan 31, 2019
This commit extends previous work in rust-lang#55007 where the name from the visible parent was used for modules. Now, we also print the name from the visible parent for types.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #39175.