diff options
| author | kadmin <julianknodt@gmail.com> | 2021-05-06 15:33:44 +0000 |
|---|---|---|
| committer | kadmin <julianknodt@gmail.com> | 2021-07-26 21:15:18 +0000 |
| commit | 8759f00c73641d44b3ab7a2290e3c58168d3e30f (patch) | |
| tree | b2d4cdbbaa0b84be96c03e068d0f1fa6539d4ec7 /compiler/rustc_privacy/src | |
| parent | 3605675bb1b4f1fb65f80585ded2b62aea15bf2c (diff) | |
| download | rust-8759f00c73641d44b3ab7a2290e3c58168d3e30f.tar.gz rust-8759f00c73641d44b3ab7a2290e3c58168d3e30f.zip | |
Actually infer args in visitors
Diffstat (limited to 'compiler/rustc_privacy/src')
| -rw-r--r-- | compiler/rustc_privacy/src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_privacy/src/lib.rs b/compiler/rustc_privacy/src/lib.rs index e77bda7d4ab..cd91ecdf2ba 100644 --- a/compiler/rustc_privacy/src/lib.rs +++ b/compiler/rustc_privacy/src/lib.rs @@ -1224,6 +1224,13 @@ impl<'tcx> Visitor<'tcx> for TypePrivacyVisitor<'tcx> { } } } else { + let local_id = self.tcx.hir().local_def_id(inf.hir_id); + if let Some(did) = self.tcx.opt_const_param_of(local_id) { + if self.visit_def_id(did, "inferred", &"").is_break() { + return; + } + } + // FIXME see above note for same issue. if self.visit(rustc_typeck::hir_ty_to_ty(self.tcx, &inf.to_ty())).is_break() { return; |
