Skip to content

Commit

Permalink
libpanic_unwind => 2018: fix ICEs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Feb 13, 2019
1 parent f2fe12a commit f9e9c91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/librustc_typeck/check/method/suggest.rs
Expand Up @@ -752,12 +752,11 @@ fn compute_all_traits<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Vec<DefId>
traits: &mut Vec<DefId>,
external_mods: &mut FxHashSet<DefId>,
def: Def) {
let def_id = def.def_id();
match def {
Def::Trait(..) => {
Def::Trait(def_id) => {
traits.push(def_id);
}
Def::Mod(..) => {
Def::Mod(def_id) => {
if !external_mods.insert(def_id) {
return;
}
Expand Down
8 changes: 5 additions & 3 deletions src/librustdoc/visit_lib.rs
Expand Up @@ -60,9 +60,11 @@ impl<'a, 'tcx, 'rcx> LibEmbargoVisitor<'a, 'tcx, 'rcx> {
}

for item in self.cx.tcx.item_children(def_id).iter() {
if self.cx.tcx.def_key(item.def.def_id()).parent.map_or(false, |d| d == def_id.index) ||
item.vis == Visibility::Public {
self.visit_item(item.def);
if let Some(def_id) = item.def.opt_def_id() {
if self.cx.tcx.def_key(def_id).parent.map_or(false, |d| d == def_id.index) ||
item.vis == Visibility::Public {
self.visit_item(item.def);
}
}
}
}
Expand Down

0 comments on commit f9e9c91

Please sign in to comment.