Skip to content

Commit

Permalink
Suggested change
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckeogh committed Jul 16, 2019
1 parent 2ced474 commit 3c11944
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/librustc/traits/specialize/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,11 @@ pub(super) fn specialization_graph_provider(
}

let access_levels = tcx.privacy_access_levels(impl_def_id.krate);
let id = tcx.hir().as_local_hir_id(impl_def_id).unwrap();
if access_levels.is_exported(id) || access_levels.is_public(id) {
for cause in &overlap.intercrate_ambiguity_causes {
cause.add_intercrate_ambiguity_hint(&mut err);
if let Some(id) = tcx.hir().as_local_hir_id(impl_def_id) {
if access_levels.is_exported(id) || access_levels.is_public(id) {
for cause in &overlap.intercrate_ambiguity_causes {
cause.add_intercrate_ambiguity_hint(&mut err);
}
}
}

Expand Down

0 comments on commit 3c11944

Please sign in to comment.