Skip to content

Commit c9766de

Browse files
committed
Import rustc_middle::ty::Ty as Ty rather than MiddleTy
1 parent 085312b commit c9766de

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_lint/src/internal.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use rustc_hir::def::Res;
55
use rustc_hir::def_id::DefId;
66
use rustc_hir::{Expr, ExprKind, HirId};
77
use rustc_middle::ty::{
8-
self, ClauseKind, GenericArgsRef, ParamTy, ProjectionPredicate, TraitPredicate, Ty as MiddleTy,
8+
self, ClauseKind, GenericArgsRef, ParamTy, ProjectionPredicate, TraitPredicate, Ty,
99
};
1010
use rustc_session::{declare_lint_pass, declare_tool_lint};
1111
use rustc_span::hygiene::{ExpnKind, MacroKind};
@@ -192,7 +192,7 @@ fn get_callee_span_generic_args_and_args<'tcx>(
192192
fn get_input_traits_and_projections<'tcx>(
193193
cx: &LateContext<'tcx>,
194194
callee_def_id: DefId,
195-
input: MiddleTy<'tcx>,
195+
input: Ty<'tcx>,
196196
) -> (Vec<TraitPredicate<'tcx>>, Vec<ProjectionPredicate<'tcx>>) {
197197
let mut trait_predicates = Vec::new();
198198
let mut projection_predicates = Vec::new();
@@ -548,7 +548,7 @@ impl LateLintPass<'_> for Diagnostics {
548548

549549
impl Diagnostics {
550550
// Is the type `{D,Subd}iagMessage`?
551-
fn is_diag_message<'cx>(cx: &LateContext<'cx>, ty: MiddleTy<'cx>) -> bool {
551+
fn is_diag_message<'cx>(cx: &LateContext<'cx>, ty: Ty<'cx>) -> bool {
552552
if let Some(adt_def) = ty.ty_adt_def()
553553
&& let Some(name) = cx.tcx.get_diagnostic_name(adt_def.did())
554554
&& matches!(name, sym::DiagMessage | sym::SubdiagMessage)
@@ -562,7 +562,7 @@ impl Diagnostics {
562562
fn untranslatable_diagnostic<'cx>(
563563
cx: &LateContext<'cx>,
564564
def_id: DefId,
565-
arg_tys_and_spans: &[(MiddleTy<'cx>, Span)],
565+
arg_tys_and_spans: &[(Ty<'cx>, Span)],
566566
) {
567567
let fn_sig = cx.tcx.fn_sig(def_id).instantiate_identity().skip_binder();
568568
let predicates = cx.tcx.predicates_of(def_id).instantiate_identity(cx.tcx).predicates;

0 commit comments

Comments
 (0)