Repository navigation
Closed
Labels
A-tidyArea: The tidy toolArea: The tidy toolC-bugCategory: This is a bug.Category: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)requires-custom-configThis issue requires custom config/build for rustc in some wayThis issue requires custom config/build for rustc in some way
Description
If I set remap-debuginfo = true in bootstrap.toml (for example, by setting profile = "dist"), and then run ./x test tidy, I get a series of style errors in src/tools/tidy/src/style.rs itself:
Details
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:10: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
>> TODO: ` or `XXX` directives.
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:115: Don't use magic numbers that spell things (consider 0x12345678)
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:116: Don't use magic numbers that spell things (consider 0x12345678)
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:117: Don't use magic numbers that spell things (consider 0x12345678)
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:441: `dbg!` macro is intended as a debugging tool. It should not be in version control.
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:451: `dbg!` macro is intended as a debugging tool. It should not be in version control.
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:457: the `todo!` macro is used for tasks that should be done before merging a PR.
If you want to panic here, use `panic!`, `unimplemented!`, `unreachable!`, `rustc_middle::bug!` or an assertion
>> TODO: "
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:465: the `todo!` macro is used for tasks that should be done before merging a PR.
If you want to panic here, use `panic!`, `unimplemented!`, `unreachable!`, `rustc_middle::bug!` or an assertion
>> TODO: "todo in line because of previous check"
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:473: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
>> TODO: {}", without_end)
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:479: the `todo!` macro is used for tasks that should be done before merging a PR.
If you want to panic here, use `panic!`, `unimplemented!`, `unreachable!`, `rustc_middle::bug!` or an assertion
>> TODO: ` macro is used for tasks that should be done before merging a PR.\nIf you want to panic here, use `panic!`, `unimplemented!`, `unreachable!`, `rustc_middle::bug!` or an assertion{message}"
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:530: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
>> TODO: ") {
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:532: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
>> TODO: ").expect("TODO in line because of previous check").1;
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:538: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
>> TODO: {}", without_colon)
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:543: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
>> TODO: is used for tasks that should be done before merging a PR;\nIf you want to leave a message in the codebase use FIXME{message}",
tidy [style (src)]: /path/to/rust/src/tools/tidy/src/style.rs:546: Instead of XXX use FIXME
tidy [style (src)]: FAIL
tidy: The following check failed: style (src)
Seems to be caused by the recent change to make bootstrap use Cargo trim-path: #161049. The issue is that it remaps file!() from /path/to/rust/<relative_path> to /rustc/<hash>/<relative_path>. However, tidy still uses the original path when checking.
A quick fix could be to hardcode the path to style.rs, the way it's already done for codegen.rs, but maybe there's something smarter to do here 😄 Happy to look into that some more.
Reacted by Max
Metadata
Metadata
Assignees
Labels
A-tidyArea: The tidy toolArea: The tidy toolC-bugCategory: This is a bug.Category: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)requires-custom-configThis issue requires custom config/build for rustc in some wayThis issue requires custom config/build for rustc in some way
Activity
xlambein commentedon Oct 19, 2026
I'm finding other issues connected to
remap-debuginfo. For example, if I run./x test src/bootstrapwith that option enabled, I get 68 failures in the snapshot tests, because it's trying to read the snapshots from/rustc/<hash>/..., which of course does not exist.Kobzol commentedon Oct 19, 2026
Bootstrap has hundreds of configuration knobs, any many of them will somehow break tests. That's not to say that we can't make some of them work, but it's kinda expected that changing the config can produce broken tests or toolchains.
paradoxicalguy commentedon Oct 21, 2026
@rustbot claim
paradoxicalguy commentedon Oct 21, 2026
well, hardcoding a path works, it passes
python x.py test tidyboth w debuginfo-remap as true and false.
Rollup merge of rust-lang#164681 - paradoxicalguy:tidy-clean-up, r=Ko…
Rollup merge of rust-lang#164681 - paradoxicalguy:tidy-clean-up, r=Ko…
Unrolled build for #164681 in rollup 164699