From 02e7e3b26fdcb80c5eb8d70adabafc9e851cd479 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 16 Apr 2024 15:48:47 +1000 Subject: [PATCH] Rename a tiny module. So it doesn't clash with `rustc_middle::ty`. --- .../rustc_const_eval/src/transform/check_consts/check.rs | 2 +- .../rustc_const_eval/src/transform/check_consts/ops.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs index 543996c86baca..1ea30e3a2aff9 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs @@ -168,7 +168,7 @@ impl<'ck, 'mir, 'tcx> TypeVisitor> for LocalReturnTyVisitor<'ck, 'm match t.kind() { ty::FnPtr(_) => {} ty::Ref(_, _, hir::Mutability::Mut) => { - self.checker.check_op(ops::ty::MutRef(self.kind)); + self.checker.check_op(ops::mut_ref::MutRef(self.kind)); t.super_visit_with(self) } _ => t.super_visit_with(self), diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs index 9775f1980c59b..dda8f3ed87d28 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs @@ -10,8 +10,8 @@ use rustc_infer::traits::{ImplSource, Obligation, ObligationCause}; use rustc_middle::mir::{self, CallSource}; use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::{ - self as middle_ty, suggest_constraining_type_param, Closure, FnDef, FnPtr, GenericArgKind, - GenericArgsRef, Param, TraitRef, Ty, + self, suggest_constraining_type_param, Closure, FnDef, FnPtr, GenericArgKind, GenericArgsRef, + Param, TraitRef, Ty, }; use rustc_middle::util::{call_kind, CallDesugaringKind, CallKind}; use rustc_session::parse::feature_err; @@ -124,7 +124,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> { ); } } - middle_ty::Adt(..) => { + ty::Adt(..) => { let obligation = Obligation::new(tcx, ObligationCause::dummy(), param_env, trait_ref); @@ -621,7 +621,7 @@ impl<'tcx> NonConstOp<'tcx> for ThreadLocalAccess { } /// Types that cannot appear in the signature or locals of a `const fn`. -pub mod ty { +pub mod mut_ref { use super::*; #[derive(Debug)]