-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Clarify where is_import
is used
#47095
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
Conversation
So it's not mistaken for dead code.
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -132,6 +132,7 @@ pub struct Export { | |||
/// We include non-`pub` exports for hygienic macros that get used from extern crates. | |||
pub vis: ty::Visibility, | |||
/// True if from a `use` or and `extern crate`. | |||
/// Used in rustdoc. | |||
pub is_import: bool, |
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.
Can't this be checked by way of tcx.def_key(export.def.def_id()).parent
? Or by adding a DefId
of the export itself, and comparing that to export.def.def_id()
.
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.
Yeah, this should be removable with a little refactoring in rustdoc, opened #47100.
cc @jseyfried who added |
@bors r+ rollup |
📌 Commit f6ff377 has been approved by |
Clarify where `is_import` is used So it's not mistaken for dead code.
☀️ Test successful - status-appveyor, status-travis |
So it's not mistaken for dead code.