Fold visit into ty

This commit is contained in:
Michael Goulet
2025-03-13 17:09:25 +00:00
parent dc0cdfd753
commit e5a2220327
56 changed files with 100 additions and 117 deletions

View File

@@ -1466,7 +1466,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
}
}
impl<'tcx> ty::visit::TypeVisitor<TyCtxt<'tcx>> for OpaqueTypesVisitor<'tcx> {
impl<'tcx> ty::TypeVisitor<TyCtxt<'tcx>> for OpaqueTypesVisitor<'tcx> {
fn visit_ty(&mut self, t: Ty<'tcx>) {
if let Some((kind, def_id)) = TyCategory::from_ty(self.tcx, t) {
let span = self.tcx.def_span(def_id);

View File

@@ -18,7 +18,7 @@ use rustc_middle::ty::{
TypeFoldable, TypeFolder, TypeSuperFoldable, TypeckResults,
};
use rustc_span::{BytePos, DUMMY_SP, FileName, Ident, Span, sym};
use rustc_type_ir::visit::TypeVisitableExt;
use rustc_type_ir::TypeVisitableExt;
use tracing::{debug, instrument, warn};
use super::nice_region_error::placeholder_error::Highlighted;

View File

@@ -71,7 +71,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
}
}
impl<'tcx> ty::visit::TypeVisitor<TyCtxt<'tcx>> for HighlightBuilder<'tcx> {
impl<'tcx> ty::TypeVisitor<TyCtxt<'tcx>> for HighlightBuilder<'tcx> {
fn visit_region(&mut self, r: ty::Region<'tcx>) {
if !r.has_name() && self.counter <= 3 {
self.highlight.highlighting_region(r, self.counter);