diff options
| author | Oneirical <manchot@videotron.ca> | 2024-07-11 14:01:37 -0400 |
|---|---|---|
| committer | Oneirical <manchot@videotron.ca> | 2024-07-18 11:13:59 -0400 |
| commit | 9dc08e30bd0668396dee18eacbcb96dc6d0ddda3 (patch) | |
| tree | ffdd02aec757219c18b04276bc78c3ffb2699b69 | |
| parent | b01a977b0737e177f9b03949b908c250020d0119 (diff) | |
| download | rust-9dc08e30bd0668396dee18eacbcb96dc6d0ddda3.tar.gz rust-9dc08e30bd0668396dee18eacbcb96dc6d0ddda3.zip | |
Rewrite and rename issue-22131 to rmake
| -rw-r--r-- | src/tools/tidy/src/allowed_run_make_makefiles.txt | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-22131/Makefile | 8 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-cfgspec-parsing/foo.rs (renamed from tests/run-make/issue-22131/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-cfgspec-parsing/rmake.rs | 19 |
4 files changed, 19 insertions, 9 deletions
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 745f00c4f52..7a787255da6 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -38,7 +38,6 @@ run-make/interdependent-c-libraries/Makefile run-make/issue-107094/Makefile run-make/issue-14698/Makefile run-make/issue-15460/Makefile -run-make/issue-22131/Makefile run-make/issue-26006/Makefile run-make/issue-28595/Makefile run-make/issue-33329/Makefile diff --git a/tests/run-make/issue-22131/Makefile b/tests/run-make/issue-22131/Makefile deleted file mode 100644 index 4f33a4659cc..00000000000 --- a/tests/run-make/issue-22131/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# ignore-cross-compile -include ../tools.mk - -all: foo.rs - $(RUSTC) --cfg 'feature="bar"' --crate-type lib foo.rs - $(RUSTDOC) --test --cfg 'feature="bar"' \ - -L $(TMPDIR) foo.rs |\ - $(CGREP) 'foo.rs - foo (line 1) ... ok' diff --git a/tests/run-make/issue-22131/foo.rs b/tests/run-make/rustdoc-cfgspec-parsing/foo.rs index 7b955a07b97..7b955a07b97 100644 --- a/tests/run-make/issue-22131/foo.rs +++ b/tests/run-make/rustdoc-cfgspec-parsing/foo.rs diff --git a/tests/run-make/rustdoc-cfgspec-parsing/rmake.rs b/tests/run-make/rustdoc-cfgspec-parsing/rmake.rs new file mode 100644 index 00000000000..7cb66575c54 --- /dev/null +++ b/tests/run-make/rustdoc-cfgspec-parsing/rmake.rs @@ -0,0 +1,19 @@ +// A rustdoc bug caused the `feature=bar` syntax for the cfg flag to be interpreted +// wrongly, with `feature=bar` instead of just `bar` being understood as the feature name. +// After this was fixed in #22135, this test checks that this bug does not make a resurgence. +// See https://github.com/rust-lang/rust/issues/22131 + +//FIXME(Oneirical): try test-various + +use run_make_support::{rustc, rustdoc}; + +fn main() { + rustc().cfg(r#"feature="bar""#).crate_type("lib").input("foo.rs").run(); + rustdoc() + .arg("--test") + .arg("--cfg") + .arg(r#"feature="bar""#) + .input("foo.rs") + .run() + .assert_stdout_contains("foo.rs - foo (line 1) ... ok"); +} |
