Skip to content

Commit 4498d1f

Browse files
committed
remove remaining references to Reveal
1 parent 21cca8a commit 4498d1f

File tree

34 files changed

+93
-84
lines changed

34 files changed

+93
-84
lines changed

compiler/rustc_codegen_cranelift/src/abi/mod.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub(crate) fn get_function_sig<'tcx>(
8080
clif_sig_from_fn_abi(
8181
tcx,
8282
default_call_conv,
83-
&RevealAllLayoutCx(tcx).fn_abi_of_instance(inst, ty::List::empty()),
83+
&FullyMonomorphizedLayoutCx(tcx).fn_abi_of_instance(inst, ty::List::empty()),
8484
)
8585
}
8686

@@ -438,9 +438,9 @@ pub(crate) fn codegen_terminator_call<'tcx>(
438438
extra_args.iter().map(|op_arg| fx.monomorphize(op_arg.node.ty(fx.mir, fx.tcx))),
439439
);
440440
let fn_abi = if let Some(instance) = instance {
441-
RevealAllLayoutCx(fx.tcx).fn_abi_of_instance(instance, extra_args)
441+
FullyMonomorphizedLayoutCx(fx.tcx).fn_abi_of_instance(instance, extra_args)
442442
} else {
443-
RevealAllLayoutCx(fx.tcx).fn_abi_of_fn_ptr(fn_sig, extra_args)
443+
FullyMonomorphizedLayoutCx(fx.tcx).fn_abi_of_fn_ptr(fn_sig, extra_args)
444444
};
445445

446446
let is_cold = if fn_sig.abi() == ExternAbi::RustCold {
@@ -721,8 +721,8 @@ pub(crate) fn codegen_drop<'tcx>(
721721
def: ty::InstanceKind::Virtual(drop_instance.def_id(), 0),
722722
args: drop_instance.args,
723723
};
724-
let fn_abi =
725-
RevealAllLayoutCx(fx.tcx).fn_abi_of_instance(virtual_drop, ty::List::empty());
724+
let fn_abi = FullyMonomorphizedLayoutCx(fx.tcx)
725+
.fn_abi_of_instance(virtual_drop, ty::List::empty());
726726

727727
let sig = clif_sig_from_fn_abi(fx.tcx, fx.target_config.default_call_conv, &fn_abi);
728728
let sig = fx.bcx.import_signature(sig);
@@ -764,8 +764,8 @@ pub(crate) fn codegen_drop<'tcx>(
764764
def: ty::InstanceKind::Virtual(drop_instance.def_id(), 0),
765765
args: drop_instance.args,
766766
};
767-
let fn_abi =
768-
RevealAllLayoutCx(fx.tcx).fn_abi_of_instance(virtual_drop, ty::List::empty());
767+
let fn_abi = FullyMonomorphizedLayoutCx(fx.tcx)
768+
.fn_abi_of_instance(virtual_drop, ty::List::empty());
769769

770770
let sig = clif_sig_from_fn_abi(fx.tcx, fx.target_config.default_call_conv, &fn_abi);
771771
let sig = fx.bcx.import_signature(sig);
@@ -774,8 +774,8 @@ pub(crate) fn codegen_drop<'tcx>(
774774
_ => {
775775
assert!(!matches!(drop_instance.def, InstanceKind::Virtual(_, _)));
776776

777-
let fn_abi =
778-
RevealAllLayoutCx(fx.tcx).fn_abi_of_instance(drop_instance, ty::List::empty());
777+
let fn_abi = FullyMonomorphizedLayoutCx(fx.tcx)
778+
.fn_abi_of_instance(drop_instance, ty::List::empty());
779779

780780
let arg_value = drop_place.place_ref(
781781
fx,

compiler/rustc_codegen_cranelift/src/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub(crate) fn codegen_fn<'tcx>(
103103
let block_map: IndexVec<BasicBlock, Block> =
104104
(0..mir.basic_blocks.len()).map(|_| bcx.create_block()).collect();
105105

106-
let fn_abi = RevealAllLayoutCx(tcx).fn_abi_of_instance(instance, ty::List::empty());
106+
let fn_abi = FullyMonomorphizedLayoutCx(tcx).fn_abi_of_instance(instance, ty::List::empty());
107107

108108
// Make FunctionCx
109109
let target_config = module.target_config();

compiler/rustc_codegen_cranelift/src/common.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ pub(crate) struct FunctionCx<'m, 'clif, 'tcx: 'm> {
311311
impl<'tcx> LayoutOfHelpers<'tcx> for FunctionCx<'_, '_, 'tcx> {
312312
#[inline]
313313
fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! {
314-
RevealAllLayoutCx(self.tcx).handle_layout_err(err, span, ty)
314+
FullyMonomorphizedLayoutCx(self.tcx).handle_layout_err(err, span, ty)
315315
}
316316
}
317317

@@ -323,7 +323,7 @@ impl<'tcx> FnAbiOfHelpers<'tcx> for FunctionCx<'_, '_, 'tcx> {
323323
span: Span,
324324
fn_abi_request: FnAbiRequest<'tcx>,
325325
) -> ! {
326-
RevealAllLayoutCx(self.tcx).handle_fn_abi_err(err, span, fn_abi_request)
326+
FullyMonomorphizedLayoutCx(self.tcx).handle_fn_abi_err(err, span, fn_abi_request)
327327
}
328328
}
329329

@@ -443,9 +443,9 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
443443
}
444444
}
445445

446-
pub(crate) struct RevealAllLayoutCx<'tcx>(pub(crate) TyCtxt<'tcx>);
446+
pub(crate) struct FullyMonomorphizedLayoutCx<'tcx>(pub(crate) TyCtxt<'tcx>);
447447

448-
impl<'tcx> LayoutOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> {
448+
impl<'tcx> LayoutOfHelpers<'tcx> for FullyMonomorphizedLayoutCx<'tcx> {
449449
#[inline]
450450
fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! {
451451
if let LayoutError::SizeOverflow(_) | LayoutError::ReferencesError(_) = err {
@@ -459,7 +459,7 @@ impl<'tcx> LayoutOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> {
459459
}
460460
}
461461

462-
impl<'tcx> FnAbiOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> {
462+
impl<'tcx> FnAbiOfHelpers<'tcx> for FullyMonomorphizedLayoutCx<'tcx> {
463463
#[inline]
464464
fn handle_fn_abi_err(
465465
&self,
@@ -485,25 +485,25 @@ impl<'tcx> FnAbiOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> {
485485
}
486486
}
487487

488-
impl<'tcx> layout::HasTyCtxt<'tcx> for RevealAllLayoutCx<'tcx> {
488+
impl<'tcx> layout::HasTyCtxt<'tcx> for FullyMonomorphizedLayoutCx<'tcx> {
489489
fn tcx<'b>(&'b self) -> TyCtxt<'tcx> {
490490
self.0
491491
}
492492
}
493493

494-
impl<'tcx> rustc_abi::HasDataLayout for RevealAllLayoutCx<'tcx> {
494+
impl<'tcx> rustc_abi::HasDataLayout for FullyMonomorphizedLayoutCx<'tcx> {
495495
fn data_layout(&self) -> &rustc_abi::TargetDataLayout {
496496
&self.0.data_layout
497497
}
498498
}
499499

500-
impl<'tcx> layout::HasTypingEnv<'tcx> for RevealAllLayoutCx<'tcx> {
500+
impl<'tcx> layout::HasTypingEnv<'tcx> for FullyMonomorphizedLayoutCx<'tcx> {
501501
fn typing_env(&self) -> ty::TypingEnv<'tcx> {
502502
ty::TypingEnv::fully_monomorphized()
503503
}
504504
}
505505

506-
impl<'tcx> HasTargetSpec for RevealAllLayoutCx<'tcx> {
506+
impl<'tcx> HasTargetSpec for FullyMonomorphizedLayoutCx<'tcx> {
507507
fn target_spec(&self) -> &Target {
508508
&self.0.sess.target
509509
}

compiler/rustc_codegen_cranelift/src/debuginfo/types.rs

+11-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_data_structures::fx::FxHashMap;
66
use rustc_middle::ty::layout::LayoutOf;
77
use rustc_middle::ty::{self, Ty, TyCtxt};
88

9-
use crate::{DebugContext, RevealAllLayoutCx, has_ptr_meta};
9+
use crate::{DebugContext, FullyMonomorphizedLayoutCx, has_ptr_meta};
1010

1111
#[derive(Default)]
1212
pub(crate) struct TypeDebugContext<'tcx> {
@@ -85,7 +85,7 @@ impl DebugContext {
8585
type_entry.set(gimli::DW_AT_encoding, AttributeValue::Encoding(encoding));
8686
type_entry.set(
8787
gimli::DW_AT_byte_size,
88-
AttributeValue::Udata(RevealAllLayoutCx(tcx).layout_of(ty).size.bytes()),
88+
AttributeValue::Udata(FullyMonomorphizedLayoutCx(tcx).layout_of(ty).size.bytes()),
8989
);
9090

9191
type_id
@@ -159,7 +159,7 @@ impl DebugContext {
159159
return_if_type_created_in_meantime!(type_dbg, tuple_type);
160160

161161
let name = type_names::compute_debuginfo_type_name(tcx, tuple_type, false);
162-
let layout = RevealAllLayoutCx(tcx).layout_of(tuple_type);
162+
let layout = FullyMonomorphizedLayoutCx(tcx).layout_of(tuple_type);
163163

164164
let tuple_type_id =
165165
self.dwarf.unit.add(self.dwarf.unit.root(), gimli::DW_TAG_structure_type);
@@ -178,7 +178,9 @@ impl DebugContext {
178178
member_entry.set(gimli::DW_AT_type, AttributeValue::UnitRef(dw_ty));
179179
member_entry.set(
180180
gimli::DW_AT_alignment,
181-
AttributeValue::Udata(RevealAllLayoutCx(tcx).layout_of(ty).align.pref.bytes()),
181+
AttributeValue::Udata(
182+
FullyMonomorphizedLayoutCx(tcx).layout_of(ty).align.pref.bytes(),
183+
),
182184
);
183185
member_entry.set(
184186
gimli::DW_AT_data_member_location,
@@ -198,7 +200,11 @@ impl DebugContext {
198200
self.debug_type(
199201
tcx,
200202
type_dbg,
201-
Ty::new_array(tcx, tcx.types.u8, RevealAllLayoutCx(tcx).layout_of(ty).size.bytes()),
203+
Ty::new_array(
204+
tcx,
205+
tcx.types.u8,
206+
FullyMonomorphizedLayoutCx(tcx).layout_of(ty).size.bytes(),
207+
),
202208
)
203209
}
204210
}

compiler/rustc_codegen_cranelift/src/global_asm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub(crate) fn codegen_global_asm_item(tcx: TyCtxt<'_>, global_asm: &mut String,
4242
tcx,
4343
op_sp,
4444
const_value,
45-
RevealAllLayoutCx(tcx).layout_of(ty),
45+
FullyMonomorphizedLayoutCx(tcx).layout_of(ty),
4646
);
4747
global_asm.push_str(&string);
4848
}

compiler/rustc_codegen_cranelift/src/inline_asm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ pub(crate) fn codegen_naked_asm<'tcx>(
238238
tcx,
239239
span,
240240
const_value,
241-
RevealAllLayoutCx(tcx).layout_of(cv.ty()),
241+
FullyMonomorphizedLayoutCx(tcx).layout_of(cv.ty()),
242242
);
243243
CInlineAsmOperand::Const { value }
244244
}

compiler/rustc_middle/src/mir/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,7 @@ impl<'tcx> Body<'tcx> {
629629
) -> Option<(u128, &'a SwitchTargets)> {
630630
// There are two places here we need to evaluate a constant.
631631
let eval_mono_const = |constant: &ConstOperand<'tcx>| {
632-
// FIXME(#132279): what is this, why are we using an empty environment with
633-
// `RevealAll` here.
632+
// FIXME(#132279): what is this, why are we using an empty environment here.
634633
let typing_env = ty::TypingEnv::fully_monomorphized();
635634
let mono_literal = instance.instantiate_mir_and_normalize_erasing_regions(
636635
tcx,

compiler/rustc_middle/src/query/mod.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -1373,9 +1373,10 @@ rustc_queries! {
13731373
/// Gets the ParameterEnvironment for a given item; this environment
13741374
/// will be in "user-facing" mode, meaning that it is suitable for
13751375
/// type-checking etc, and it does not normalize specializable
1376-
/// associated types. This is almost always what you want,
1377-
/// unless you are doing MIR optimizations, in which case you
1378-
/// might want to use `reveal_all()` method to change modes.
1376+
/// associated types.
1377+
///
1378+
/// You should pretty much only use this if an `infcx` is available,
1379+
/// otherwise use a `TypingEnv`.
13791380
query param_env(def_id: DefId) -> ty::ParamEnv<'tcx> {
13801381
desc { |tcx| "computing normalized predicates of `{}`", tcx.def_path_str(def_id) }
13811382
feedable
@@ -1471,7 +1472,7 @@ rustc_queries! {
14711472
}
14721473

14731474
/// Computes the layout of a type. Note that this implicitly
1474-
/// executes in "reveal all" mode, and will normalize the input type.
1475+
/// executes in `TypingMode::PostAnalysis`, and will normalize the input type.
14751476
query layout_of(
14761477
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>
14771478
) -> Result<ty::layout::TyAndLayout<'tcx>, &'tcx ty::layout::LayoutError<'tcx>> {

compiler/rustc_middle/src/ty/instance.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ impl<'tcx> Instance<'tcx> {
504504
/// ```
505505
///
506506
/// trying to resolve `Debug::fmt` applied to `T` will yield `Ok(None)`, because we do not
507-
/// know what code ought to run. (Note that this setting is also affected by the
508-
/// `RevealMode` in the parameter environment.)
507+
/// know what code ought to run. This setting is also affected by the current `TypingMode`
508+
/// of the environment.
509509
///
510510
/// Presuming that coherence and type-check have succeeded, if this method is invoked
511511
/// in a monomorphic context (i.e., like during codegen), then it is guaranteed to return

compiler/rustc_middle/src/ty/layout.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -682,14 +682,14 @@ pub trait LayoutOfHelpers<'tcx>: HasDataLayout + HasTyCtxt<'tcx> + HasTypingEnv<
682682
/// Blanket extension trait for contexts that can compute layouts of types.
683683
pub trait LayoutOf<'tcx>: LayoutOfHelpers<'tcx> {
684684
/// Computes the layout of a type. Note that this implicitly
685-
/// executes in "reveal all" mode, and will normalize the input type.
685+
/// executes in `TypingMode::PostAnalysis`, and will normalize the input type.
686686
#[inline]
687687
fn layout_of(&self, ty: Ty<'tcx>) -> Self::LayoutOfResult {
688688
self.spanned_layout_of(ty, DUMMY_SP)
689689
}
690690

691691
/// Computes the layout of a type, at `span`. Note that this implicitly
692-
/// executes in "reveal all" mode, and will normalize the input type.
692+
/// executes in `TypingMode::PostAnalysis`, and will normalize the input type.
693693
// FIXME(eddyb) avoid passing information like this, and instead add more
694694
// `TyCtxt::at`-like APIs to be able to do e.g. `cx.at(span).layout_of(ty)`.
695695
#[inline]

compiler/rustc_middle/src/ty/util.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,8 @@ impl<'tcx> TyCtxt<'tcx> {
423423
pub fn async_drop_glue_morphology(self, did: DefId) -> AsyncDropGlueMorphology {
424424
let ty: Ty<'tcx> = self.type_of(did).instantiate_identity();
425425

426-
// Async drop glue morphology is an internal detail, so reveal_all probably
427-
// should be fine
426+
// Async drop glue morphology is an internal detail, so
427+
// using `TypingMode::PostAnalysis` probably should be fine.
428428
let typing_env = ty::TypingEnv::fully_monomorphized();
429429
if ty.needs_async_drop(self, typing_env) {
430430
AsyncDropGlueMorphology::Custom

compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ impl<'tcx> ConstToPat<'tcx> {
8080
let pat_from_kind = |kind| Box::new(Pat { span: self.span, ty, kind });
8181

8282
// It's not *technically* correct to be revealing opaque types here as borrowcheck has
83-
// not run yet. However, CTFE itself uses `Reveal::All` unconditionally even during
84-
// typeck and not doing so has a lot of (undesirable) fallout (#101478, #119821). As a
85-
// result we always use a revealed env when resolving the instance to evaluate.
83+
// not run yet. However, CTFE itself uses `TypingMode::PostAnalysis` unconditionally even
84+
// during typeck and not doing so has a lot of (undesirable) fallout (#101478, #119821).
85+
// As a result we always use a revealed env when resolving the instance to evaluate.
8686
//
87-
// FIXME: `const_eval_resolve_for_typeck` should probably just set the env to `Reveal::All`
87+
// FIXME: `const_eval_resolve_for_typeck` should probably just modify the env itself
8888
// instead of having this logic here
8989
let typing_env =
9090
self.tcx.erase_regions(self.typing_env).with_post_analysis_normalized(self.tcx);

compiler/rustc_mir_transform/src/known_panics_lint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
258258
// Normalization needed b/c known panics lint runs in
259259
// `mir_drops_elaborated_and_const_checked`, which happens before
260260
// optimized MIR. Only after optimizing the MIR can we guarantee
261-
// that the `RevealAll` pass has happened and that the body's consts
261+
// that the `PostAnalysisNormalize` pass has happened and that the body's consts
262262
// are normalized, so any call to resolve before that needs to be
263263
// manually normalized.
264264
let val = self.tcx.try_normalize_erasing_regions(self.typing_env, c.const_).ok()?;

compiler/rustc_mir_transform/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ declare_passes! {
163163
mod remove_unneeded_drops : RemoveUnneededDrops;
164164
mod remove_zsts : RemoveZsts;
165165
mod required_consts : RequiredConstsVisitor;
166-
mod reveal_all : RevealAll;
166+
mod post_analysis_normalize : PostAnalysisNormalize;
167167
mod sanity_check : SanityCheck;
168168
// This pass is public to allow external drivers to perform MIR cleanup
169169
pub mod simplify :
@@ -604,8 +604,8 @@ fn run_runtime_lowering_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
604604
// These next passes must be executed together.
605605
&add_call_guards::CriticalCallEdges,
606606
// Must be done before drop elaboration because we need to drop opaque types, too.
607-
&reveal_all::RevealAll,
608-
// Calling this after reveal_all ensures that we don't deal with opaque types.
607+
&post_analysis_normalize::PostAnalysisNormalize,
608+
// Calling this after `PostAnalysisNormalize` ensures that we don't deal with opaque types.
609609
&add_subtyping_projections::Subtyper,
610610
&elaborate_drops::ElaborateDrops,
611611
// This will remove extraneous landing pads which are no longer

compiler/rustc_mir_transform/src/reveal_all.rs renamed to compiler/rustc_mir_transform/src/post_analysis_normalize.rs

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
1-
//! Normalizes MIR in RevealAll mode.
1+
//! Normalizes MIR in TypingMode::PostAnalysis mode, most notably revealing
2+
//! its opaques.
23
34
use rustc_middle::mir::visit::*;
45
use rustc_middle::mir::*;
56
use rustc_middle::ty::{self, Ty, TyCtxt};
67

7-
pub(super) struct RevealAll;
8+
pub(super) struct PostAnalysisNormalize;
89

9-
impl<'tcx> crate::MirPass<'tcx> for RevealAll {
10+
impl<'tcx> crate::MirPass<'tcx> for PostAnalysisNormalize {
1011
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
1112
// FIXME(#132279): This is used during the phase transition from analysis
1213
// to runtime, so we have to manually specify the correct typing mode.
1314
let typing_env = ty::TypingEnv::post_analysis(tcx, body.source.def_id());
14-
RevealAllVisitor { tcx, typing_env }.visit_body_preserves_cfg(body);
15+
PostAnalysisNormalizeVisitor { tcx, typing_env }.visit_body_preserves_cfg(body);
1516
}
1617
}
1718

18-
struct RevealAllVisitor<'tcx> {
19+
struct PostAnalysisNormalizeVisitor<'tcx> {
1920
tcx: TyCtxt<'tcx>,
2021
typing_env: ty::TypingEnv<'tcx>,
2122
}
2223

23-
impl<'tcx> MutVisitor<'tcx> for RevealAllVisitor<'tcx> {
24+
impl<'tcx> MutVisitor<'tcx> for PostAnalysisNormalizeVisitor<'tcx> {
2425
#[inline]
2526
fn tcx(&self) -> TyCtxt<'tcx> {
2627
self.tcx
@@ -38,7 +39,7 @@ impl<'tcx> MutVisitor<'tcx> for RevealAllVisitor<'tcx> {
3839
return;
3940
}
4041
// `OpaqueCast` projections are only needed if there are opaque types on which projections
41-
// are performed. After the `RevealAll` pass, all opaque types are replaced with their
42+
// are performed. After the `PostAnalysisNormalize` pass, all opaque types are replaced with their
4243
// hidden types, so we don't need these projections anymore.
4344
place.projection = self.tcx.mk_place_elems(
4445
&place

compiler/rustc_mir_transform/src/remove_unneeded_drops.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
//!
33
//! When the MIR is built, we check `needs_drop` before emitting a `Drop` for a place. This pass is
44
//! useful because (unlike MIR building) it runs after type checking, so it can make use of
5-
//! `Reveal::All` to provide more precise type information.
5+
//! `TypingMode::PostAnalysis` to provide more precise type information, especially about opaque
6+
//! types.
67
78
use rustc_middle::mir::*;
89
use rustc_middle::ty::TyCtxt;

compiler/rustc_mir_transform/src/shim.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ fn make_shim<'tcx>(tcx: TyCtxt<'tcx>, instance: ty::InstanceKind<'tcx>) -> Body<
141141
debug!("make_shim({:?}) = untransformed {:?}", instance, result);
142142

143143
// We don't validate MIR here because the shims may generate code that's
144-
// only valid in a reveal-all param-env. However, since we do initial
144+
// only valid in a `PostAnalysis` param-env. However, since we do initial
145145
// validation with the MirBuilt phase, which uses a user-facing param-env.
146146
// This causes validation errors when TAITs are involved.
147147
pm::run_passes_no_validate(

compiler/rustc_mir_transform/src/validate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
646646
{
647647
self.fail(
648648
location,
649-
format!("explicit opaque type cast to `{ty}` after `RevealAll`"),
649+
format!("explicit opaque type cast to `{ty}` after `PostAnalysisNormalize`"),
650650
)
651651
}
652652
ProjectionElem::Index(index) => {

compiler/rustc_monomorphize/src/collector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ fn create_mono_items_for_default_impls<'tcx>(
15561556
// Unlike 'lazy' monomorphization that begins by collecting items transitively
15571557
// called by `main` or other global items, when eagerly monomorphizing impl
15581558
// items, we never actually check that the predicates of this impl are satisfied
1559-
// in a empty reveal-all param env (i.e. with no assumptions).
1559+
// in a empty param env (i.e. with no assumptions).
15601560
//
15611561
// Even though this impl has no type or const generic parameters, because we don't
15621562
// consider higher-ranked predicates such as `for<'a> &'a mut [u8]: Copy` to

0 commit comments

Comments
 (0)