Rollup merge of #92582 - lcnr:generic-arg-infer, r=BoxyUwU
improve `_` constants in item signature handling
removing the "type" from the error messages does slightly worsen the error messages for types, but figuring out whether the placeholder is for a type or a constant and correctly dealing with that seemed fairly difficult to me so I took the easy way out ✨ Imo the error message is still clear enough.
r? `@BoxyUwU` cc `@estebank`
This commit is contained in:
commit
db1253f1d2
40 changed files with 424 additions and 256 deletions
|
@ -1148,19 +1148,11 @@ impl<'tcx> Visitor<'tcx> for TypePrivacyVisitor<'tcx> {
|
|||
if self.visit(ty).is_break() {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// We don't do anything for const infers here.
|
||||
}
|
||||
} 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;
|
||||
}
|
||||
bug!("visit_infer without typeck_results");
|
||||
}
|
||||
intravisit::walk_inf(self, inf);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue