Formatting.
This commit is contained in:
parent
51d10249e7
commit
60c3bbd844
7 changed files with 14 additions and 10 deletions
|
@ -29,7 +29,7 @@ macro_rules! arena_types {
|
||||||
[] field_pat: rustc_hir::FieldPat<$tcx>,
|
[] field_pat: rustc_hir::FieldPat<$tcx>,
|
||||||
[] fn_decl: rustc_hir::FnDecl<$tcx>,
|
[] fn_decl: rustc_hir::FnDecl<$tcx>,
|
||||||
[] foreign_item: rustc_hir::ForeignItem<$tcx>,
|
[] foreign_item: rustc_hir::ForeignItem<$tcx>,
|
||||||
[] foreign_item_ref: rustc_hir::ForeignItemRef<$tcx>,
|
[few] foreign_item_ref: rustc_hir::ForeignItemRef<$tcx>,
|
||||||
[] impl_item_ref: rustc_hir::ImplItemRef<$tcx>,
|
[] impl_item_ref: rustc_hir::ImplItemRef<$tcx>,
|
||||||
[few] inline_asm: rustc_hir::InlineAsm<$tcx>,
|
[few] inline_asm: rustc_hir::InlineAsm<$tcx>,
|
||||||
[few] llvm_inline_asm: rustc_hir::LlvmInlineAsm<$tcx>,
|
[few] llvm_inline_asm: rustc_hir::LlvmInlineAsm<$tcx>,
|
||||||
|
|
|
@ -1855,7 +1855,7 @@ pub struct FnSig<'hir> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// The bodies for items are stored "out of line", in a separate
|
// The bodies for items are stored "out of line", in a separate
|
||||||
// hashmap in the `Crate`. Here we just record the node-id of the item
|
// hashmap in the `Crate`. Here we just record the hir-id of the item
|
||||||
// so it can fetched later.
|
// so it can fetched later.
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Encodable, Debug)]
|
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Encodable, Debug)]
|
||||||
pub struct TraitItemId {
|
pub struct TraitItemId {
|
||||||
|
@ -1899,7 +1899,7 @@ pub enum TraitItemKind<'hir> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// The bodies for items are stored "out of line", in a separate
|
// The bodies for items are stored "out of line", in a separate
|
||||||
// hashmap in the `Crate`. Here we just record the node-id of the item
|
// hashmap in the `Crate`. Here we just record the hir-id of the item
|
||||||
// so it can fetched later.
|
// so it can fetched later.
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Encodable, Debug)]
|
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Encodable, Debug)]
|
||||||
pub struct ImplItemId {
|
pub struct ImplItemId {
|
||||||
|
@ -2441,7 +2441,7 @@ impl VariantData<'hir> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// The bodies for items are stored "out of line", in a separate
|
// The bodies for items are stored "out of line", in a separate
|
||||||
// hashmap in the `Crate`. Here we just record the node-id of the item
|
// hashmap in the `Crate`. Here we just record the hir-id of the item
|
||||||
// so it can fetched later.
|
// so it can fetched later.
|
||||||
#[derive(Copy, Clone, Encodable, Debug)]
|
#[derive(Copy, Clone, Encodable, Debug)]
|
||||||
pub struct ItemId {
|
pub struct ItemId {
|
||||||
|
@ -2624,7 +2624,7 @@ pub enum AssocItemKind {
|
||||||
}
|
}
|
||||||
|
|
||||||
// The bodies for items are stored "out of line", in a separate
|
// The bodies for items are stored "out of line", in a separate
|
||||||
// hashmap in the `Crate`. Here we just record the node-id of the item
|
// hashmap in the `Crate`. Here we just record the hir-id of the item
|
||||||
// so it can fetched later.
|
// so it can fetched later.
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Encodable, Debug)]
|
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Encodable, Debug)]
|
||||||
pub struct ForeignItemId {
|
pub struct ForeignItemId {
|
||||||
|
|
|
@ -289,7 +289,7 @@ pub trait Visitor<'v>: Sized {
|
||||||
walk_list!(self, visit_impl_item, opt_item);
|
walk_list!(self, visit_impl_item, opt_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Like `visit_nested_item()`, but for impl items. See
|
/// Like `visit_nested_item()`, but for foreign items. See
|
||||||
/// `visit_nested_item()` for advice on when to override this
|
/// `visit_nested_item()` for advice on when to override this
|
||||||
/// method.
|
/// method.
|
||||||
fn visit_nested_foreign_item(&mut self, id: ForeignItemId) {
|
fn visit_nested_foreign_item(&mut self, id: ForeignItemId) {
|
||||||
|
|
|
@ -46,7 +46,9 @@ impl<'a, 'tcx> ItemLikeVisitor<'tcx> for EntryContext<'a, 'tcx> {
|
||||||
// Entry fn is never a trait item.
|
// Entry fn is never a trait item.
|
||||||
}
|
}
|
||||||
|
|
||||||
fn visit_foreign_item(&mut self, _: &'tcx ForeignItem<'tcx>) {}
|
fn visit_foreign_item(&mut self, _: &'tcx ForeignItem<'tcx>) {
|
||||||
|
// Entry fn is never a foreign item.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn entry_fn(tcx: TyCtxt<'_>, cnum: CrateNum) -> Option<(LocalDefId, EntryFnType)> {
|
fn entry_fn(tcx: TyCtxt<'_>, cnum: CrateNum) -> Option<(LocalDefId, EntryFnType)> {
|
||||||
|
|
|
@ -379,7 +379,9 @@ impl<'a, 'tcx> ItemLikeVisitor<'tcx> for CollectPrivateImplItemsVisitor<'a, 'tcx
|
||||||
// processed in visit_item above
|
// processed in visit_item above
|
||||||
}
|
}
|
||||||
|
|
||||||
fn visit_foreign_item(&mut self, _foreign_item: &hir::ForeignItem<'_>) {}
|
fn visit_foreign_item(&mut self, _foreign_item: &hir::ForeignItem<'_>) {
|
||||||
|
// We never export foreign functions as they have no body to export.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn reachable_set<'tcx>(tcx: TyCtxt<'tcx>, crate_num: CrateNum) -> FxHashSet<LocalDefId> {
|
fn reachable_set<'tcx>(tcx: TyCtxt<'tcx>, crate_num: CrateNum) -> FxHashSet<LocalDefId> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue