about summary refs log tree commit diff
path: root/src/librustc_privacy/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_privacy/lib.rs')
-rw-r--r--src/librustc_privacy/lib.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs
index fc00050f405..797b2d35e9d 100644
--- a/src/librustc_privacy/lib.rs
+++ b/src/librustc_privacy/lib.rs
@@ -778,13 +778,8 @@ impl Visitor<'tcx> for EmbargoVisitor<'tcx> {
             }
             // The interface is empty.
             hir::ItemKind::GlobalAsm(..) => {}
-            hir::ItemKind::OpaqueTy(..) => {
-                // FIXME: This is some serious pessimization intended to workaround deficiencies
-                // in the reachability pass (`middle/reachable.rs`). Types are marked as link-time
-                // reachable if they are returned via `impl Trait`, even from private functions.
-                let exist_level = cmp::max(item_level, Some(AccessLevel::ReachableFromImplTrait));
-                self.reach(item.hir_id, exist_level).generics().predicates().ty();
-            }
+            // assume the type is never reachable - since it's opaque, no one can use it from this interface
+            hir::ItemKind::OpaqueTy(..) => {}
             // Visit everything.
             hir::ItemKind::Const(..)
             | hir::ItemKind::Static(..)