Skip to content

Commit d3f3a68

Browse files
committed
Make -C hint-mostly-unused require -Zunstable-options for now
1 parent e96e15f commit d3f3a68

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/rustc_session/src/config.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2441,6 +2441,12 @@ pub fn build_session_options(early_dcx: &mut EarlyDiagCtxt, matches: &getopts::M
24412441
}
24422442
}
24432443

2444+
if cg.hint_mostly_unused && !unstable_opts.unstable_options {
2445+
early_dcx.early_fatal(
2446+
"`-C hint-mostly-unused` requires `-Zunstable-options` and a nightly compiler",
2447+
)
2448+
}
2449+
24442450
if !nightly_options::is_unstable_enabled(matches)
24452451
&& cg.force_frame_pointers == FramePointer::NonLeaf
24462452
{

0 commit comments

Comments
 (0)