diff options
| author | Urgau <urgau@numericable.fr> | 2023-07-27 19:04:13 +0200 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2023-07-27 19:05:17 +0200 |
| commit | 9268a8b060f01ace9e925f27778d2768f4850cf8 (patch) | |
| tree | c753d018025ed3c6f0a40aed2d213c1f6a8f5353 /compiler/rustc_session/src | |
| parent | 23405bb123681399c912552fa1c09264c0d4930d (diff) | |
| download | rust-9268a8b060f01ace9e925f27778d2768f4850cf8.tar.gz rust-9268a8b060f01ace9e925f27778d2768f4850cf8.zip | |
Make `--print KIND=PATH` unstable
https://github.com/rust-lang/rust/pull/113780 should have gone through an MCP+FCP but wasn't, but instead of reverting the original PR, this PR just make that new option unstable.
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 36b5c385ab1..0fadcf7899d 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -2151,6 +2151,12 @@ fn collect_print_requests( prints.extend(matches.opt_strs("print").into_iter().map(|req| { let (req, out) = split_out_file_name(&req); + if out.is_some() && !unstable_opts.unstable_options { + handler.early_error( + "the `-Z unstable-options` flag must also be passed to \ + enable the path print option", + ); + } let kind = match PRINT_KINDS.iter().find(|&&(name, _)| name == req) { Some((_, PrintKind::TargetSpec)) => { if unstable_opts.unstable_options { |
