1
Fork 0

Rollup merge of #137263 - compiler-errors:inherentless, r=lcnr

Register `USAGE_OF_TYPE_IR_INHERENT`, remove inherent usages

I implemented a lint to discourage the usage of `rustc_type_ir::inherent` but never actually enabled it. People started using `rustc_type_ir::inherent` methods through globs, lol.

r? fmease or reassign as you please
This commit is contained in:
Matthias Krüger 2025-02-20 00:55:14 +01:00 committed by GitHub
commit 4981994588
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 5 deletions

View file

@ -18,7 +18,6 @@ use rustc_middle::ty::{
TypeFoldable, TypeFolder, TypeSuperFoldable, TypeckResults,
};
use rustc_span::{BytePos, DUMMY_SP, FileName, Ident, Span, sym};
use rustc_type_ir::inherent::*;
use rustc_type_ir::visit::TypeVisitableExt;
use tracing::{debug, instrument, warn};
@ -217,7 +216,7 @@ impl<'a, 'tcx> TypeFolder<TyCtxt<'tcx>> for ClosureEraser<'a, 'tcx> {
// `_` because then we'd end up with `Vec<_, _>`, instead of
// `Vec<_>`.
arg
} else if let GenericArgKind::Type(_) = arg.kind() {
} else if let GenericArgKind::Type(_) = arg.unpack() {
// We don't replace lifetime or const params, only type params.
self.new_infer().into()
} else {