mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-27 18:56:24 +00:00
![]() compiletest: properly handle revisioned run-rustfix tests Before this PR, if you have a revisioned `//@ run-rustfix` test like `//`@[foo]` run-rustfix`, you would run into an error saying crate name cannot contain `.` characters because the fixed test file trying to be compiled is named `<test-name>.<revision>.fixed`, from which `rustc` infers the crate name to be `<test-name>.<revision>` which is not a valid crate name. This PR fixes the problem by constructing a synthetic crate name from `<test-name>.<revision>`, by 1. replacing all `-` with `_`, and 2. replacing all `.` with `__` and pass that constructed crate name with `--crate-name` to rustc to compile the fixed file. Fixes https://github.com/rust-lang/rust/issues/123596. |
||
---|---|---|
.. | ||
assembly | ||
auxiliary | ||
codegen | ||
codegen-units | ||
coverage | ||
coverage-run-rustdoc | ||
debuginfo | ||
incremental | ||
mir-opt | ||
pretty | ||
run-make | ||
run-make-fulldeps | ||
run-pass-valgrind | ||
rustdoc | ||
rustdoc-gui | ||
rustdoc-js | ||
rustdoc-js-std | ||
rustdoc-json | ||
rustdoc-ui | ||
ui | ||
ui-fulldeps | ||
COMPILER_TESTS.md |