Skip to content

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

Merged
merged 1 commit into from
Jan 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/librustc/hir/def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Member

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().

Copy link
Contributor

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.

}

Expand Down