Skip to content

Commit 36fdfa9

Browse files
committed
move fn is_item_raw to TypingEnv
1 parent 7d40450 commit 36fdfa9

File tree

60 files changed

+180
-168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+180
-168
lines changed

compiler/rustc_borrowck/src/type_check/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1727,7 +1727,8 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
17271727
// `Sized` bound in no way depends on precise regions, so this
17281728
// shouldn't affect `is_sized`.
17291729
let erased_ty = tcx.erase_regions(ty);
1730-
if !erased_ty.is_sized(tcx, self.infcx.param_env) {
1730+
// FIXME(#132279): Using `Ty::is_sized` causes us to incorrectly handle opaques here.
1731+
if !erased_ty.is_sized(tcx, self.infcx.typing_env(self.infcx.param_env)) {
17311732
// in current MIR construction, all non-control-flow rvalue
17321733
// expressions evaluate through `as_temp` or `into` a return
17331734
// slot or local, so to find all unsized rvalues it is enough

compiler/rustc_codegen_cranelift/src/base.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
1111
use rustc_middle::mir::InlineAsmMacro;
1212
use rustc_middle::ty::TypeVisitableExt;
1313
use rustc_middle::ty::adjustment::PointerCoercion;
14-
use rustc_middle::ty::layout::FnAbiOf;
14+
use rustc_middle::ty::layout::{FnAbiOf, HasTypingEnv};
1515
use rustc_middle::ty::print::with_no_trimmed_paths;
1616

1717
use crate::constant::ConstantCx;
@@ -841,7 +841,7 @@ fn codegen_stmt<'tcx>(
841841
lval.write_cvalue(fx, CValue::by_val(operand, box_layout));
842842
}
843843
Rvalue::NullaryOp(ref null_op, ty) => {
844-
assert!(lval.layout().ty.is_sized(fx.tcx, ty::ParamEnv::reveal_all()));
844+
assert!(lval.layout().ty.is_sized(fx.tcx, fx.typing_env()));
845845
let layout = fx.layout_of(fx.monomorphize(ty));
846846
let val = match null_op {
847847
NullOp::SizeOf => layout.size.bytes(),

compiler/rustc_codegen_cranelift/src/common.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fn clif_pair_type_from_ty<'tcx>(
103103

104104
/// Is a pointer to this type a wide ptr?
105105
pub(crate) fn has_ptr_meta<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> bool {
106-
if ty.is_sized(tcx, ty::ParamEnv::reveal_all()) {
106+
if ty.is_sized(tcx, ty::TypingEnv::fully_monomorphized()) {
107107
return false;
108108
}
109109

compiler/rustc_codegen_ssa/src/traits/type_.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ pub trait DerivedTypeCodegenMethods<'tcx>:
7878
}
7979

8080
fn type_is_sized(&self, ty: Ty<'tcx>) -> bool {
81-
ty.is_sized(self.tcx(), ty::ParamEnv::reveal_all())
81+
ty.is_sized(self.tcx(), self.typing_env())
8282
}
8383

8484
fn type_is_freeze(&self, ty: Ty<'tcx>) -> bool {
85-
ty.is_freeze(self.tcx(), ty::ParamEnv::reveal_all())
85+
ty.is_freeze(self.tcx(), self.typing_env())
8686
}
8787

8888
fn type_has_metadata(&self, ty: Ty<'tcx>) -> bool {
89-
if ty.is_sized(self.tcx(), self.param_env()) {
89+
if ty.is_sized(self.tcx(), self.typing_env()) {
9090
return false;
9191
}
9292

compiler/rustc_const_eval/src/check_consts/resolver.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,7 @@ where
120120
///
121121
/// [rust-lang/unsafe-code-guidelines#134]: https://github.com/rust-lang/unsafe-code-guidelines/issues/134
122122
fn shared_borrow_allows_mutation(&self, place: mir::Place<'tcx>) -> bool {
123-
!place
124-
.ty(self.ccx.body, self.ccx.tcx)
125-
.ty
126-
.is_freeze(self.ccx.tcx, self.ccx.typing_env.param_env)
123+
!place.ty(self.ccx.body, self.ccx.tcx).ty.is_freeze(self.ccx.tcx, self.ccx.typing_env)
127124
}
128125
}
129126

compiler/rustc_const_eval/src/const_eval/machine.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
667667
.is_some_and(|p| !p.immutable())
668668
{
669669
// That next check is expensive, that's why we have all the guards above.
670-
let is_immutable = ty.is_freeze(*ecx.tcx, ecx.param_env);
670+
let is_immutable = ty.is_freeze(*ecx.tcx, ecx.typing_env());
671671
let place = ecx.ref_to_mplace(val)?;
672672
let new_place = if is_immutable {
673673
place.map_provenance(CtfeProvenance::as_immutable)

compiler/rustc_const_eval/src/interpret/eval_context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
250250

251251
#[inline]
252252
pub fn type_is_freeze(&self, ty: Ty<'tcx>) -> bool {
253-
ty.is_freeze(*self.tcx, self.param_env)
253+
ty.is_freeze(*self.tcx, self.typing_env())
254254
}
255255

256256
pub fn load_mir(

compiler/rustc_const_eval/src/interpret/intern.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ pub fn intern_const_alloc_recursive<'tcx, M: CompileTimeMachine<'tcx, const_eval
165165
InternKind::Static(Mutability::Not) => {
166166
(
167167
// Outermost allocation is mutable if `!Freeze`.
168-
if ret.layout.ty.is_freeze(*ecx.tcx, ecx.param_env) {
168+
if ret.layout.ty.is_freeze(*ecx.tcx, ecx.typing_env()) {
169169
Mutability::Not
170170
} else {
171171
Mutability::Mut

compiler/rustc_const_eval/src/interpret/memory.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
860860
// # Global allocations
861861
if let Some(global_alloc) = self.tcx.try_get_global_alloc(id) {
862862
let (size, align) = global_alloc.size_and_align(*self.tcx, self.typing_env());
863-
let mutbl = global_alloc.mutability(*self.tcx, self.param_env);
863+
let mutbl = global_alloc.mutability(*self.tcx, self.typing_env());
864864
let kind = match global_alloc {
865865
GlobalAlloc::Static { .. } | GlobalAlloc::Memory { .. } => AllocKind::LiveData,
866866
GlobalAlloc::Function { .. } => bug!("We already checked function pointers above"),

compiler/rustc_const_eval/src/interpret/validity.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValidityVisitor<'rt, 'tcx, M> {
619619
};
620620
// Determine what it actually points to.
621621
let alloc_actual_mutbl =
622-
global_alloc.mutability(*self.ecx.tcx, self.ecx.param_env);
622+
global_alloc.mutability(*self.ecx.tcx, self.ecx.typing_env());
623623
// Mutable pointer to immutable memory is no good.
624624
if ptr_expected_mutbl == Mutability::Mut
625625
&& alloc_actual_mutbl == Mutability::Not
@@ -848,7 +848,7 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValidityVisitor<'rt, 'tcx, M> {
848848
if let Some(alloc_id) = mplace.ptr().provenance.and_then(|p| p.get_alloc_id()) {
849849
let tcx = *self.ecx.tcx;
850850
// Everything must be already interned.
851-
let mutbl = tcx.global_alloc(alloc_id).mutability(tcx, self.ecx.param_env);
851+
let mutbl = tcx.global_alloc(alloc_id).mutability(tcx, self.ecx.typing_env());
852852
if let Some((_, alloc)) = self.ecx.memory.alloc_map.get(alloc_id) {
853853
assert_eq!(alloc.mutability, mutbl);
854854
}
@@ -1085,7 +1085,9 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValueVisitor<'tcx, M> for ValidityVisitor<'rt,
10851085
) -> InterpResult<'tcx> {
10861086
// Special check for CTFE validation, preventing `UnsafeCell` inside unions in immutable memory.
10871087
if self.ctfe_mode.is_some_and(|c| !c.allow_immutable_unsafe_cell()) {
1088-
if !val.layout.is_zst() && !val.layout.ty.is_freeze(*self.ecx.tcx, self.ecx.param_env) {
1088+
if !val.layout.is_zst()
1089+
&& !val.layout.ty.is_freeze(*self.ecx.tcx, self.ecx.typing_env())
1090+
{
10891091
if !self.in_mutable_memory(val) {
10901092
throw_validation_failure!(self.path, UnsafeCellInImmutable);
10911093
}

compiler/rustc_hir_analysis/src/check/check.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -90,24 +90,24 @@ fn check_union_fields(tcx: TyCtxt<'_>, span: Span, item_def_id: LocalDefId) -> b
9090
fn allowed_union_field<'tcx>(
9191
ty: Ty<'tcx>,
9292
tcx: TyCtxt<'tcx>,
93-
param_env: ty::ParamEnv<'tcx>,
93+
typing_env: ty::TypingEnv<'tcx>,
9494
) -> bool {
9595
// We don't just accept all !needs_drop fields, due to semver concerns.
9696
match ty.kind() {
9797
ty::Ref(..) => true, // references never drop (even mutable refs, which are non-Copy and hence fail the later check)
9898
ty::Tuple(tys) => {
9999
// allow tuples of allowed types
100-
tys.iter().all(|ty| allowed_union_field(ty, tcx, param_env))
100+
tys.iter().all(|ty| allowed_union_field(ty, tcx, typing_env))
101101
}
102102
ty::Array(elem, _len) => {
103103
// Like `Copy`, we do *not* special-case length 0.
104-
allowed_union_field(*elem, tcx, param_env)
104+
allowed_union_field(*elem, tcx, typing_env)
105105
}
106106
_ => {
107107
// Fallback case: allow `ManuallyDrop` and things that are `Copy`,
108108
// also no need to report an error if the type is unresolved.
109109
ty.ty_adt_def().is_some_and(|adt_def| adt_def.is_manually_drop())
110-
|| ty.is_copy_modulo_regions(tcx, param_env)
110+
|| ty.is_copy_modulo_regions(tcx, typing_env)
111111
|| ty.references_error()
112112
}
113113
}
@@ -121,7 +121,7 @@ fn check_union_fields(tcx: TyCtxt<'_>, span: Span, item_def_id: LocalDefId) -> b
121121
continue;
122122
};
123123

124-
if !allowed_union_field(field_ty, tcx, typing_env.param_env) {
124+
if !allowed_union_field(field_ty, tcx, typing_env) {
125125
let (field_span, ty_span) = match tcx.hir().get_if_local(field.did) {
126126
// We are currently checking the type this field came from, so it must be local.
127127
Some(Node::Field(field)) => (field.span, field.ty.span),

compiler/rustc_hir_analysis/src/check/intrinsicck.rs

+11-6
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,37 @@ use rustc_target::asm::{
1515

1616
pub struct InlineAsmCtxt<'a, 'tcx> {
1717
tcx: TyCtxt<'tcx>,
18-
param_env: ty::ParamEnv<'tcx>,
18+
typing_env: ty::TypingEnv<'tcx>,
1919
get_operand_ty: Box<dyn Fn(&'tcx hir::Expr<'tcx>) -> Ty<'tcx> + 'a>,
2020
}
2121

2222
impl<'a, 'tcx> InlineAsmCtxt<'a, 'tcx> {
2323
pub fn new_global_asm(tcx: TyCtxt<'tcx>) -> Self {
2424
InlineAsmCtxt {
2525
tcx,
26-
param_env: ty::ParamEnv::empty(),
26+
typing_env: ty::TypingEnv {
27+
typing_mode: ty::TypingMode::non_body_analysis(),
28+
param_env: ty::ParamEnv::empty(),
29+
},
2730
get_operand_ty: Box::new(|e| bug!("asm operand in global asm: {e:?}")),
2831
}
2932
}
3033

34+
// FIXME(#132279): This likely causes us to incorrectly handle opaque types in their
35+
// defining scope.
3136
pub fn new_in_fn(
3237
tcx: TyCtxt<'tcx>,
33-
param_env: ty::ParamEnv<'tcx>,
38+
typing_env: ty::TypingEnv<'tcx>,
3439
get_operand_ty: impl Fn(&'tcx hir::Expr<'tcx>) -> Ty<'tcx> + 'a,
3540
) -> Self {
36-
InlineAsmCtxt { tcx, param_env, get_operand_ty: Box::new(get_operand_ty) }
41+
InlineAsmCtxt { tcx, typing_env, get_operand_ty: Box::new(get_operand_ty) }
3742
}
3843

3944
// FIXME(compiler-errors): This could use `<$ty as Pointee>::Metadata == ()`
4045
fn is_thin_ptr_ty(&self, ty: Ty<'tcx>) -> bool {
4146
// Type still may have region variables, but `Sized` does not depend
4247
// on those, so just erase them before querying.
43-
if ty.is_sized(self.tcx, self.param_env) {
48+
if ty.is_sized(self.tcx, self.typing_env) {
4449
return true;
4550
}
4651
if let ty::Foreign(..) = ty.kind() {
@@ -171,7 +176,7 @@ impl<'a, 'tcx> InlineAsmCtxt<'a, 'tcx> {
171176

172177
// Check that the type implements Copy. The only case where this can
173178
// possibly fail is for SIMD types which don't #[derive(Copy)].
174-
if !ty.is_copy_modulo_regions(self.tcx, self.param_env) {
179+
if !ty.is_copy_modulo_regions(self.tcx, self.typing_env) {
175180
let msg = "arguments for inline assembly must be copyable";
176181
self.tcx
177182
.dcx()

compiler/rustc_hir_analysis/src/coherence/orphan.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ pub(crate) fn orphan_check_impl(
172172
// impl<T> AutoTrait for T {}
173173
// impl<T: ?Sized> AutoTrait for T {}
174174
ty::Param(..) => (
175-
if self_ty.is_sized(tcx, tcx.param_env(impl_def_id)) {
175+
if self_ty.is_sized(tcx, ty::TypingEnv::non_body_analysis(tcx, impl_def_id)) {
176176
LocalImpl::Allow
177177
} else {
178178
LocalImpl::Disallow { problematic_kind: "generic type" }

compiler/rustc_hir_typeck/src/expr_use_visitor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ impl<'tcx> TypeInformationCtxt<'tcx> for (&LateContext<'tcx>, LocalDefId) {
228228
}
229229

230230
fn type_is_copy_modulo_regions(&self, ty: Ty<'tcx>) -> bool {
231-
ty.is_copy_modulo_regions(self.0.tcx, self.0.param_env)
231+
ty.is_copy_modulo_regions(self.0.tcx, self.0.typing_env())
232232
}
233233

234234
fn body_owner_def_id(&self) -> LocalDefId {

compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
105105
self.tcx.erase_regions(ty)
106106
}
107107
};
108-
InlineAsmCtxt::new_in_fn(self.tcx, self.param_env, get_operand_ty)
109-
.check_asm(asm, enclosing_id);
108+
InlineAsmCtxt::new_in_fn(
109+
self.tcx,
110+
self.infcx.typing_env(self.param_env),
111+
get_operand_ty,
112+
)
113+
.check_asm(asm, enclosing_id);
110114
}
111115
}
112116

compiler/rustc_lint/src/builtin.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use rustc_middle::bug;
3232
use rustc_middle::lint::in_external_macro;
3333
use rustc_middle::ty::layout::LayoutOf;
3434
use rustc_middle::ty::print::with_no_trimmed_paths;
35-
use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt, TypingMode, Upcast, VariantDef};
35+
use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt, Upcast, VariantDef};
3636
use rustc_session::lint::FutureIncompatibilityReason;
3737
// hardwired lints from rustc_lint_defs
3838
pub use rustc_session::lint::builtin::*;
@@ -586,10 +586,10 @@ impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations {
586586
return;
587587
}
588588
}
589-
if ty.is_copy_modulo_regions(cx.tcx, cx.param_env) {
589+
if ty.is_copy_modulo_regions(cx.tcx, cx.typing_env()) {
590590
return;
591591
}
592-
if type_implements_negative_copy_modulo_regions(cx.tcx, ty, cx.param_env) {
592+
if type_implements_negative_copy_modulo_regions(cx.tcx, ty, cx.typing_env()) {
593593
return;
594594
}
595595
if def.is_variant_list_non_exhaustive()
@@ -637,8 +637,9 @@ impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations {
637637
fn type_implements_negative_copy_modulo_regions<'tcx>(
638638
tcx: TyCtxt<'tcx>,
639639
ty: Ty<'tcx>,
640-
param_env: ty::ParamEnv<'tcx>,
640+
typing_env: ty::TypingEnv<'tcx>,
641641
) -> bool {
642+
let (infcx, param_env) = tcx.infer_ctxt().build_with_typing_env(typing_env);
642643
let trait_ref = ty::TraitRef::new(tcx, tcx.require_lang_item(hir::LangItem::Copy, None), [ty]);
643644
let pred = ty::TraitPredicate { trait_ref, polarity: ty::PredicatePolarity::Negative };
644645
let obligation = traits::Obligation {
@@ -647,10 +648,7 @@ fn type_implements_negative_copy_modulo_regions<'tcx>(
647648
recursion_depth: 0,
648649
predicate: pred.upcast(tcx),
649650
};
650-
651-
tcx.infer_ctxt()
652-
.build(TypingMode::non_body_analysis())
653-
.predicate_must_hold_modulo_regions(&obligation)
651+
infcx.predicate_must_hold_modulo_regions(&obligation)
654652
}
655653

656654
declare_lint! {

compiler/rustc_lint/src/drop_forget_useless.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ impl<'tcx> LateLintPass<'tcx> for DropForgetUseless {
144144
&& let Some(fn_name) = cx.tcx.get_diagnostic_name(def_id)
145145
{
146146
let arg_ty = cx.typeck_results().expr_ty(arg);
147-
let is_copy = arg_ty.is_copy_modulo_regions(cx.tcx, cx.param_env);
147+
let is_copy = arg_ty.is_copy_modulo_regions(cx.tcx, cx.typing_env());
148148
let drop_is_single_call_in_arm = is_single_call_in_arm(cx, arg, expr);
149149
let let_underscore_ignore_sugg = || {
150150
if let Some((_, node)) = cx.tcx.hir().parent_iter(expr.hir_id).nth(0)

compiler/rustc_lint/src/reference_casting.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ fn is_cast_from_ref_to_mut_ptr<'tcx>(
168168
// Except on the presence of non concrete skeleton types (ie generics)
169169
// since there is no way to make it safe for arbitrary types.
170170
let inner_ty_has_interior_mutability =
171-
!inner_ty.is_freeze(cx.tcx, cx.param_env) && inner_ty.has_concrete_skeleton();
171+
!inner_ty.is_freeze(cx.tcx, cx.typing_env()) && inner_ty.has_concrete_skeleton();
172172
(!need_check_freeze || !inner_ty_has_interior_mutability)
173173
.then_some(inner_ty_has_interior_mutability)
174174
} else {

compiler/rustc_lint/src/types.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ fn lint_wide_pointer<'tcx>(
292292
_ => return None,
293293
};
294294

295-
(!ty.is_sized(cx.tcx, cx.param_env))
295+
(!ty.is_sized(cx.tcx, cx.typing_env()))
296296
.then(|| (refs, modifiers, matches!(ty.kind(), ty::Dynamic(_, _, ty::Dyn))))
297297
};
298298

@@ -904,7 +904,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
904904
if let Some(boxed) = ty.boxed_ty()
905905
&& matches!(self.mode, CItemKind::Definition)
906906
{
907-
if boxed.is_sized(tcx, self.cx.param_env) {
907+
if boxed.is_sized(tcx, self.cx.typing_env()) {
908908
return FfiSafe;
909909
} else {
910910
return FfiUnsafe {
@@ -1069,7 +1069,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
10691069
ty::RawPtr(ty, _) | ty::Ref(_, ty, _)
10701070
if {
10711071
matches!(self.mode, CItemKind::Definition)
1072-
&& ty.is_sized(self.cx.tcx, self.cx.param_env)
1072+
&& ty.is_sized(self.cx.tcx, self.cx.typing_env())
10731073
} =>
10741074
{
10751075
FfiSafe

compiler/rustc_middle/src/mir/interpret/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub use self::pointer::{CtfeProvenance, Pointer, PointerArithmetic, Provenance};
4646
pub use self::value::Scalar;
4747
use crate::mir;
4848
use crate::ty::codec::{TyDecoder, TyEncoder};
49-
use crate::ty::{self, Instance, ParamEnv, Ty, TyCtxt};
49+
use crate::ty::{self, Instance, Ty, TyCtxt};
5050

5151
/// Uniquely identifies one of the following:
5252
/// - A constant
@@ -312,7 +312,7 @@ impl<'tcx> GlobalAlloc<'tcx> {
312312
}
313313
}
314314

315-
pub fn mutability(&self, tcx: TyCtxt<'tcx>, param_env: ParamEnv<'tcx>) -> Mutability {
315+
pub fn mutability(&self, tcx: TyCtxt<'tcx>, typing_env: ty::TypingEnv<'tcx>) -> Mutability {
316316
// Let's see what kind of memory we are.
317317
match self {
318318
GlobalAlloc::Static(did) => {
@@ -334,7 +334,7 @@ impl<'tcx> GlobalAlloc<'tcx> {
334334
.type_of(did)
335335
.no_bound_vars()
336336
.expect("statics should not have generic parameters")
337-
.is_freeze(tcx, param_env) =>
337+
.is_freeze(tcx, typing_env) =>
338338
{
339339
Mutability::Mut
340340
}

compiler/rustc_middle/src/query/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1390,19 +1390,19 @@ rustc_queries! {
13901390

13911391
/// Trait selection queries. These are best used by invoking `ty.is_copy_modulo_regions()`,
13921392
/// `ty.is_copy()`, etc, since that will prune the environment where possible.
1393-
query is_copy_raw(env: ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool {
1393+
query is_copy_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
13941394
desc { "computing whether `{}` is `Copy`", env.value }
13951395
}
13961396
/// Query backing `Ty::is_sized`.
1397-
query is_sized_raw(env: ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool {
1397+
query is_sized_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
13981398
desc { "computing whether `{}` is `Sized`", env.value }
13991399
}
14001400
/// Query backing `Ty::is_freeze`.
1401-
query is_freeze_raw(env: ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool {
1401+
query is_freeze_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
14021402
desc { "computing whether `{}` is freeze", env.value }
14031403
}
14041404
/// Query backing `Ty::is_unpin`.
1405-
query is_unpin_raw(env: ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool {
1405+
query is_unpin_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
14061406
desc { "computing whether `{}` is `Unpin`", env.value }
14071407
}
14081408
/// Query backing `Ty::needs_drop`.

0 commit comments

Comments
 (0)