Skip to content

Commit 5eda8ed

Browse files
committed
waddup gamers, today we're gonna mess up some source code
1 parent 9fa9ef3 commit 5eda8ed

File tree

72 files changed

+567
-215
lines changed

Some content is hidden

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

72 files changed

+567
-215
lines changed

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3828,8 +3828,14 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
38283828
if tcx.is_diagnostic_item(sym::deref_method, method_did) {
38293829
let deref_target =
38303830
tcx.get_diagnostic_item(sym::deref_target).and_then(|deref_target| {
3831-
Instance::try_resolve(tcx, self.param_env, deref_target, method_args)
3832-
.transpose()
3831+
Instance::try_resolve(
3832+
tcx,
3833+
self.infcx.typing_mode(self.param_env),
3834+
self.param_env,
3835+
deref_target,
3836+
method_args,
3837+
)
3838+
.transpose()
38333839
});
38343840
if let Some(Ok(instance)) = deref_target {
38353841
let deref_target_ty = instance.ty(tcx, self.param_env);

compiler/rustc_borrowck/src/diagnostics/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
864864

865865
let kind = call_kind(
866866
self.infcx.tcx,
867+
self.infcx.typing_mode(self.param_env),
867868
self.param_env,
868869
method_did,
869870
method_args,

compiler/rustc_borrowck/src/diagnostics/region_errors.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
952952

953953
if let Ok(Some(instance)) = ty::Instance::try_resolve(
954954
tcx,
955+
self.infcx.typing_mode(self.param_env),
955956
self.param_env,
956957
*fn_did,
957958
self.infcx.resolve_vars_if_possible(args),

compiler/rustc_codegen_cranelift/src/abi/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
376376
let instance = if let ty::FnDef(def_id, fn_args) = *func.layout().ty.kind() {
377377
let instance = ty::Instance::expect_resolve(
378378
fx.tcx,
379+
ty::TypingMode::PostAnalysis,
379380
ty::ParamEnv::reveal_all(),
380381
def_id,
381382
fn_args,

compiler/rustc_codegen_cranelift/src/base.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,7 @@ fn codegen_stmt<'tcx>(
666666
let func_ref = fx.get_function_ref(
667667
Instance::resolve_for_fn_ptr(
668668
fx.tcx,
669+
ty::TypingMode::PostAnalysis,
669670
ParamEnv::reveal_all(),
670671
def_id,
671672
args,

compiler/rustc_codegen_cranelift/src/constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub(crate) fn eval_mir_constant<'tcx>(
7878
let cv = fx.monomorphize(constant.const_);
7979
// This cannot fail because we checked all required_consts in advance.
8080
let val = cv
81-
.eval(fx.tcx, ty::ParamEnv::reveal_all(), constant.span)
81+
.eval(fx.tcx, ty::TypingMode::PostAnalysis, ty::ParamEnv::reveal_all(), constant.span)
8282
.expect("erroneous constant missed by mono item collection");
8383
(val, cv.ty())
8484
}

compiler/rustc_codegen_cranelift/src/inline_asm.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ pub(crate) fn codegen_inline_asm_terminator<'tcx>(
9292
if let ty::FnDef(def_id, args) = *const_.ty().kind() {
9393
let instance = ty::Instance::resolve_for_fn_ptr(
9494
fx.tcx,
95+
ty::TypingMode::PostAnalysis,
9596
ty::ParamEnv::reveal_all(),
9697
def_id,
9798
args,
@@ -231,7 +232,7 @@ pub(crate) fn codegen_naked_asm<'tcx>(
231232
ty::EarlyBinder::bind(value.const_),
232233
);
233234
let const_value = cv
234-
.eval(tcx, ty::ParamEnv::reveal_all(), value.span)
235+
.eval(tcx, ty::TypingMode::PostAnalysis, ty::ParamEnv::reveal_all(), value.span)
235236
.expect("erroneous constant missed by mono item collection");
236237

237238
let value = rustc_codegen_ssa::common::asm_const_to_str(
@@ -256,6 +257,7 @@ pub(crate) fn codegen_naked_asm<'tcx>(
256257
if let ty::FnDef(def_id, args) = *const_.ty().kind() {
257258
let instance = ty::Instance::resolve_for_fn_ptr(
258259
tcx,
260+
ty::TypingMode::PostAnalysis,
259261
ty::ParamEnv::reveal_all(),
260262
def_id,
261263
args,

compiler/rustc_codegen_cranelift/src/main_shim.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ pub(crate) fn maybe_create_entry_wrapper(
113113
.unwrap();
114114
let report = Instance::expect_resolve(
115115
tcx,
116+
ty::TypingMode::PostAnalysis,
116117
ParamEnv::reveal_all(),
117118
report.def_id,
118119
tcx.mk_args(&[GenericArg::from(main_ret_ty)]),
@@ -139,6 +140,7 @@ pub(crate) fn maybe_create_entry_wrapper(
139140
let start_def_id = tcx.require_lang_item(LangItem::Start, None);
140141
let start_instance = Instance::expect_resolve(
141142
tcx,
143+
ty::TypingMode::PostAnalysis,
142144
ParamEnv::reveal_all(),
143145
start_def_id,
144146
tcx.mk_args(&[main_ret_ty.into()]),

compiler/rustc_codegen_gcc/src/context.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ impl<'gcc, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
459459
Some(def_id) if !wants_msvc_seh(self.sess()) => {
460460
let instance = ty::Instance::expect_resolve(
461461
tcx,
462+
ty::TypingMode::PostAnalysis,
462463
ty::ParamEnv::reveal_all(),
463464
def_id,
464465
ty::List::empty(),

compiler/rustc_codegen_llvm/src/context.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,7 @@ impl<'ll, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
642642
let llfn = match tcx.lang_items().eh_personality() {
643643
Some(def_id) if name.is_none() => self.get_fn_addr(ty::Instance::expect_resolve(
644644
tcx,
645+
ty::TypingMode::PostAnalysis,
645646
ty::ParamEnv::reveal_all(),
646647
def_id,
647648
ty::List::empty(),

0 commit comments

Comments
 (0)