diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2020-08-03 21:13:13 -0400 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2020-08-03 21:26:54 -0400 |
| commit | 31fcda170a0671195b7a1506b09c5f655fc4d7e9 (patch) | |
| tree | 5483a71987fdb538dd066370d110fb944aaab6f5 /src/librustc_privacy/lib.rs | |
| parent | f042d749b0fc212bff6bdc44b84e134b878bff64 (diff) | |
| download | rust-31fcda170a0671195b7a1506b09c5f655fc4d7e9.tar.gz rust-31fcda170a0671195b7a1506b09c5f655fc4d7e9.zip | |
Fix async-std at the price of breaking half the test suite
- Don't mark impl trait as an error
Diffstat (limited to 'src/librustc_privacy/lib.rs')
| -rw-r--r-- | src/librustc_privacy/lib.rs | 9 |
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(..) |
