diff options
| author | Urgau <urgau@numericable.fr> | 2024-02-25 14:56:14 +0100 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2024-04-15 21:49:55 +0200 |
| commit | 909fcfcb6a01b9a811835ba001954e6c62b2a2bc (patch) | |
| tree | b83d43c1e4e41d2f835f5f2d99b3b935a8aa7f93 /src | |
| parent | 99d0186b1d0547eae913eff04be272c9d348b9b8 (diff) | |
| download | rust-909fcfcb6a01b9a811835ba001954e6c62b2a2bc.tar.gz rust-909fcfcb6a01b9a811835ba001954e6c62b2a2bc.zip | |
Stabilize checking of cfgs at compile-time: --check-cfg option
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/doctest.rs | 7 | ||||
| -rw-r--r-- | src/librustdoc/lib.rs | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs index 22a3cf4d44d..0ad4c9c2346 100644 --- a/src/librustdoc/doctest.rs +++ b/src/librustdoc/doctest.rs @@ -60,11 +60,8 @@ pub(crate) fn generate_args_file(file_path: &Path, options: &RustdocOptions) -> for cfg in &options.cfgs { content.push(format!("--cfg={cfg}")); } - if !options.check_cfgs.is_empty() { - content.push("-Zunstable-options".to_string()); - for check_cfg in &options.check_cfgs { - content.push(format!("--check-cfg={check_cfg}")); - } + for check_cfg in &options.check_cfgs { + content.push(format!("--check-cfg={check_cfg}")); } for lib_str in &options.lib_strs { diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index b78fb4c4eee..f2a7518b4ce 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -242,7 +242,7 @@ fn opts() -> Vec<RustcOptGroup> { o.optmulti("L", "library-path", "directory to add to crate search path", "DIR") }), stable("cfg", |o| o.optmulti("", "cfg", "pass a --cfg to rustc", "")), - unstable("check-cfg", |o| o.optmulti("", "check-cfg", "pass a --check-cfg to rustc", "")), + stable("check-cfg", |o| o.optmulti("", "check-cfg", "pass a --check-cfg to rustc", "")), stable("extern", |o| o.optmulti("", "extern", "pass an --extern to rustc", "NAME[=PATH]")), unstable("extern-html-root-url", |o| { o.optmulti( |
