about summary refs log tree commit diff
path: root/tests/ui/recursion
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-04-07 18:22:55 +0000
committerbors <bors@rust-lang.org>2024-04-07 18:22:55 +0000
commit9d5cdf75aa42faaf0b58ba21a510117e8d0051a3 (patch)
treeae6f15359c1408c6fb85b09521e3f518b4142981 /tests/ui/recursion
parente78913baef70895c966f0456ad16086a6a9aa37b (diff)
parentde3857e553b0bfaff2a6bc42a03fc9c8df9f777b (diff)
downloadrust-9d5cdf75aa42faaf0b58ba21a510117e8d0051a3.tar.gz
rust-9d5cdf75aa42faaf0b58ba21a510117e8d0051a3.zip
Auto merge of #123601 - jieyouxu:compiletest-run-rustfix-revisions, r=WaffleLapkin
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.
Diffstat (limited to 'tests/ui/recursion')
0 files changed, 0 insertions, 0 deletions