Skip to content

Commit 0ed9c64

Browse files
committed
Auto merge of #98975 - jyn514:unstable_opts, r=wesleywiser
Rename `debugging_opts` to `unstable_opts` This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`). Rename it to be more clear. cc https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Codegen.20options.20.2F.20debugging.20options r? `@Amanieu` cc `@nikic` `@joshtriplett`
2 parents 431c6f8 + 3c9765c commit 0ed9c64

File tree

125 files changed

+396
-394
lines changed

Some content is hidden

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

125 files changed

+396
-394
lines changed

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ pub fn lower_to_hir<'hir>(tcx: TyCtxt<'hir>, (): ()) -> hir::Crate<'hir> {
427427
sess.time("drop_ast", || std::mem::drop(krate));
428428

429429
// Discard hygiene data, which isn't required after lowering to HIR.
430-
if !sess.opts.debugging_opts.keep_hygiene_data {
430+
if !sess.opts.unstable_opts.keep_hygiene_data {
431431
rustc_span::hygiene::clear_syntax_context_map();
432432
}
433433

@@ -699,7 +699,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
699699
/// Intercept all spans entering HIR.
700700
/// Mark a span as relative to the current owning item.
701701
fn lower_span(&self, span: Span) -> Span {
702-
if self.tcx.sess.opts.debugging_opts.incremental_relative_spans {
702+
if self.tcx.sess.opts.unstable_opts.incremental_relative_spans {
703703
span.with_parent(Some(self.current_hir_id_owner))
704704
} else {
705705
// Do not make spans relative when not using incremental compilation.

compiler/rustc_borrowck/src/facts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub(crate) trait AllFactsExt {
4040
impl AllFactsExt for AllFacts {
4141
/// Return
4242
fn enabled(tcx: TyCtxt<'_>) -> bool {
43-
tcx.sess.opts.debugging_opts.nll_facts || tcx.sess.opts.debugging_opts.polonius
43+
tcx.sess.opts.unstable_opts.nll_facts || tcx.sess.opts.unstable_opts.polonius
4444
}
4545

4646
fn write_to_dir(

compiler/rustc_borrowck/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ fn do_mir_borrowck<'a, 'tcx>(
231231
let borrow_set =
232232
Rc::new(BorrowSet::build(tcx, body, locals_are_invalidated_at_exit, &mdpe.move_data));
233233

234-
let use_polonius = return_body_with_facts || infcx.tcx.sess.opts.debugging_opts.polonius;
234+
let use_polonius = return_body_with_facts || infcx.tcx.sess.opts.unstable_opts.polonius;
235235

236236
// Compute non-lexical lifetimes.
237237
let nll::NllOutput {

compiler/rustc_borrowck/src/nll.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,9 @@ pub(crate) fn compute_regions<'cx, 'tcx>(
278278

279279
// Dump facts if requested.
280280
let polonius_output = all_facts.as_ref().and_then(|all_facts| {
281-
if infcx.tcx.sess.opts.debugging_opts.nll_facts {
281+
if infcx.tcx.sess.opts.unstable_opts.nll_facts {
282282
let def_path = infcx.tcx.def_path(def_id);
283-
let dir_path = PathBuf::from(&infcx.tcx.sess.opts.debugging_opts.nll_facts_dir)
283+
let dir_path = PathBuf::from(&infcx.tcx.sess.opts.unstable_opts.nll_facts_dir)
284284
.join(def_path.to_filename_friendly_no_crate());
285285
all_facts.write_to_dir(dir_path, location_table).unwrap();
286286
}

compiler/rustc_borrowck/src/region_infer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
589589
// In Polonius mode, the errors about missing universal region relations are in the output
590590
// and need to be emitted or propagated. Otherwise, we need to check whether the
591591
// constraints were too strong, and if so, emit or propagate those errors.
592-
if infcx.tcx.sess.opts.debugging_opts.polonius {
592+
if infcx.tcx.sess.opts.unstable_opts.polonius {
593593
self.check_polonius_subset_errors(
594594
body,
595595
outlives_requirements.as_mut(),

compiler/rustc_builtin_macros/src/test_harness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub fn inject(sess: &Session, resolver: &mut dyn ResolverExpand, krate: &mut ast
5151
let test_runner = get_test_runner(sess, span_diagnostic, &krate);
5252

5353
if sess.opts.test {
54-
let panic_strategy = match (panic_strategy, sess.opts.debugging_opts.panic_abort_tests) {
54+
let panic_strategy = match (panic_strategy, sess.opts.unstable_opts.panic_abort_tests) {
5555
(PanicStrategy::Abort, true) => PanicStrategy::Abort,
5656
(PanicStrategy::Abort, false) => {
5757
if panic_strategy == platform_panic_strategy {

compiler/rustc_codegen_cranelift/src/allocator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub(crate) fn codegen(
2424
unwind_context,
2525
kind,
2626
tcx.lang_items().oom().is_some(),
27-
tcx.sess.opts.debugging_opts.oom,
27+
tcx.sess.opts.unstable_opts.oom,
2828
);
2929
true
3030
} else {

compiler/rustc_codegen_cranelift/src/cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ pub(crate) fn clif_int_or_float_cast(
144144
fx.bcx.ins().fcvt_to_uint_sat(to_ty, from)
145145
};
146146

147-
if let Some(false) = fx.tcx.sess.opts.debugging_opts.saturating_float_casts {
147+
if let Some(false) = fx.tcx.sess.opts.unstable_opts.saturating_float_casts {
148148
return val;
149149
}
150150

compiler/rustc_codegen_cranelift/src/debuginfo/line_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl<'tcx> DebugContext<'tcx> {
140140
// In order to have a good line stepping behavior in debugger, we overwrite debug
141141
// locations of macro expansions with that of the outermost expansion site
142142
// (unless the crate is being compiled with `-Z debug-macros`).
143-
let span = if !span.from_expansion() || tcx.sess.opts.debugging_opts.debug_macros {
143+
let span = if !span.from_expansion() || tcx.sess.opts.unstable_opts.debug_macros {
144144
span
145145
} else {
146146
// Walk up the macro expansion chain until we reach a non-expanded span.

compiler/rustc_codegen_cranelift/src/driver/aot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fn make_module(sess: &Session, isa: Box<dyn TargetIsa>, name: String) -> ObjectM
3333
// Unlike cg_llvm, cg_clif defaults to disabling -Zfunction-sections. For cg_llvm binary size
3434
// is important, while cg_clif cares more about compilation times. Enabling -Zfunction-sections
3535
// can easily double the amount of time necessary to perform linking.
36-
builder.per_function_section(sess.opts.debugging_opts.function_sections.unwrap_or(false));
36+
builder.per_function_section(sess.opts.unstable_opts.function_sections.unwrap_or(false));
3737
ObjectModule::new(builder)
3838
}
3939

0 commit comments

Comments
 (0)