Skip to content

Commit d9d6fbf

Browse files
Hack bootstrap
1 parent fb53299 commit d9d6fbf

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

Diff for: compiler/rustc_ast_lowering/src/path.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,13 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
440440

441441
// If we have a bound like `async Fn() -> T`, make sure that we mark the
442442
// `Output = T` associated type bound with the right feature gates.
443-
let output_span = self.mark_span_with_reason(
443+
let output_span = self.mark_span_with_reason(
444444
DesugaringKind::BoundModifier,
445445
output_ty.span,
446-
Some(bound_modifier_allowed_features.unwrap_or_else(|| self.allow_fn_once_output.clone())),
446+
Some(
447+
bound_modifier_allowed_features
448+
.unwrap_or_else(|| self.allow_fn_once_output.clone()),
449+
),
447450
);
448451
let constraint = self.assoc_ty_binding(sym::Output, output_span, output_ty);
449452

Diff for: compiler/rustc_middle/src/middle/stability.rs

+20-11
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use rustc_data_structures::unord::UnordMap;
1212
use rustc_errors::{Applicability, Diag, EmissionGuarantee};
1313
use rustc_feature::GateIssue;
1414
use rustc_hir::def::DefKind;
15-
use rustc_hir::def_id::{DefId, LocalDefId, LocalDefIdMap};
15+
use rustc_hir::def_id::{DefId, LocalDefId, LocalDefIdMap, LOCAL_CRATE};
1616
use rustc_hir::{self as hir, HirId};
1717
use rustc_macros::{Decodable, Encodable, HashStable, Subdiagnostic};
1818
use rustc_middle::ty::print::with_no_trimmed_paths;
@@ -604,16 +604,25 @@ impl<'tcx> TyCtxt<'tcx> {
604604
let is_allowed = matches!(eval_result, EvalResult::Allow);
605605
match eval_result {
606606
EvalResult::Allow => {}
607-
EvalResult::Deny { feature, reason, issue, suggestion, is_soft } => report_unstable(
608-
self.sess,
609-
feature,
610-
reason,
611-
issue,
612-
suggestion,
613-
is_soft,
614-
span,
615-
soft_handler,
616-
),
607+
EvalResult::Deny { feature, reason, issue, suggestion, is_soft } => {
608+
if self.crate_name(LOCAL_CRATE).as_str() == "addr2line"
609+
&& feature.as_str() == "fn_traits"
610+
&& std::env::var("RUSTC_BOOTSTRAP").is_ok()
611+
{
612+
// uwu
613+
} else {
614+
report_unstable(
615+
self.sess,
616+
feature,
617+
reason,
618+
issue,
619+
suggestion,
620+
is_soft,
621+
span,
622+
soft_handler,
623+
)
624+
}
625+
}
617626
EvalResult::Unmarked => unmarked(span, def_id),
618627
}
619628

0 commit comments

Comments
 (0)