Skip to content

Commit 02e7e3b

Browse files
committed
Rename a tiny module.
So it doesn't clash with `rustc_middle::ty`.
1 parent 40b940b commit 02e7e3b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compiler/rustc_const_eval/src/transform/check_consts/check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl<'ck, 'mir, 'tcx> TypeVisitor<TyCtxt<'tcx>> for LocalReturnTyVisitor<'ck, 'm
168168
match t.kind() {
169169
ty::FnPtr(_) => {}
170170
ty::Ref(_, _, hir::Mutability::Mut) => {
171-
self.checker.check_op(ops::ty::MutRef(self.kind));
171+
self.checker.check_op(ops::mut_ref::MutRef(self.kind));
172172
t.super_visit_with(self)
173173
}
174174
_ => t.super_visit_with(self),

compiler/rustc_const_eval/src/transform/check_consts/ops.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use rustc_infer::traits::{ImplSource, Obligation, ObligationCause};
1010
use rustc_middle::mir::{self, CallSource};
1111
use rustc_middle::ty::print::with_no_trimmed_paths;
1212
use rustc_middle::ty::{
13-
self as middle_ty, suggest_constraining_type_param, Closure, FnDef, FnPtr, GenericArgKind,
14-
GenericArgsRef, Param, TraitRef, Ty,
13+
self, suggest_constraining_type_param, Closure, FnDef, FnPtr, GenericArgKind, GenericArgsRef,
14+
Param, TraitRef, Ty,
1515
};
1616
use rustc_middle::util::{call_kind, CallDesugaringKind, CallKind};
1717
use rustc_session::parse::feature_err;
@@ -124,7 +124,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> {
124124
);
125125
}
126126
}
127-
middle_ty::Adt(..) => {
127+
ty::Adt(..) => {
128128
let obligation =
129129
Obligation::new(tcx, ObligationCause::dummy(), param_env, trait_ref);
130130

@@ -621,7 +621,7 @@ impl<'tcx> NonConstOp<'tcx> for ThreadLocalAccess {
621621
}
622622

623623
/// Types that cannot appear in the signature or locals of a `const fn`.
624-
pub mod ty {
624+
pub mod mut_ref {
625625
use super::*;
626626

627627
#[derive(Debug)]

0 commit comments

Comments
 (0)