Repository navigation
compiletest: Move all code out of the crate root - #166176
Merged
Merged
Conversation
This will make it possible to move all code out of the crate root, while retaining as much line history as possible.
Collaborator
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
Collaborator
|
r? @oli-obk rustbot has assigned @oli-obk. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Member
|
r? me |
Member
Author
|
As always I had to restrain myself from going down further cleanup rabbit-holes. 😅 |
jieyouxu
approved these changes
Nov 19, 2026
Contributor
Contributor
|
❌ Commit 7b405ef has been unapproved because PR CI timed out after |
Member
Author
|
I guess bors didn’t see me retry PR CI. @bors r=jieyouxu force |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Nov 19, 2026
compiletest: Move all code out of the crate root Most of the code in the compiletest crate root is specifically related to test discovery, and the code that isn't can easily be moved into `cli::main` instead. See rust-lang#161277 for some further explanation of why having code in the crate root is not ideal. There should be no meaningful change to compiletest behaviour.
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Nov 19, 2026
compiletest: Move all code out of the crate root Most of the code in the compiletest crate root is specifically related to test discovery, and the code that isn't can easily be moved into `cli::main` instead. See rust-lang#161277 for some further explanation of why having code in the crate root is not ideal. There should be no meaningful change to compiletest behaviour.
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 19, 2026
…uwer Rollup of 13 pull requests Successful merges: - #157721 (compiletest: Add testing for lint machinery at runtime) - #165934 (Avoid using Terminator:None in simplify_cfg) - #166117 (Remove ebadf handling from stdio) - #165094 (reflection: doc attributes from adts, fields, and variants) - #165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected) - #165694 (view-types: make sure view types are !Sized) - #165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector) - #165971 (fix: non-deterministic temporary object paths in linker maps) - #166136 (Move ub_checks() inside the const_eval_select branch.) - #166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`) - #166176 (compiletest: Move all code out of the crate root) - #166185 (simd-test: Fix cfg syntax in the test macro) - #166194 (std: Unstably constify `std::process::abort`) Failed merges: - #166150 (Reflection: refactor Type and TypeKind) - #166160 (refactor CTFE-specific intrinsics to different file)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Nov 19, 2026
compiletest: Move all code out of the crate root Most of the code in the compiletest crate root is specifically related to test discovery, and the code that isn't can easily be moved into `cli::main` instead. See rust-lang#161277 for some further explanation of why having code in the crate root is not ideal. There should be no meaningful change to compiletest behaviour.
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 19, 2026
…uwer Rollup of 16 pull requests Successful merges: - #166078 (rustc_type_ir: Optimize `sub_root_lookup_table` by using `SsoHashMap`, not `HashMap`) - #165934 (Avoid using Terminator:None in simplify_cfg) - #166050 (Use attribute parser for lang attributes in `LateResolutionVisitor`) - #166117 (Remove ebadf handling from stdio) - #166119 (Avoid an ICE on re-exports of private imports without a DefId) - #165094 (reflection: doc attributes from adts, fields, and variants) - #165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected) - #165694 (view-types: make sure view types are !Sized) - #165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector) - #165971 (fix: non-deterministic temporary object paths in linker maps) - #166064 (Add const generic transmute min support) - #166136 (Move ub_checks() inside the const_eval_select branch.) - #166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`) - #166176 (compiletest: Move all code out of the crate root) - #166185 (simd-test: Fix cfg syntax in the test macro) - #166194 (std: Unstably constify `std::process::abort`) Failed merges: - #166150 (Reflection: refactor Type and TypeKind) - #166160 (refactor CTFE-specific intrinsics to different file)
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Nov 20, 2026
compiletest: Move all code out of the crate root Most of the code in the compiletest crate root is specifically related to test discovery, and the code that isn't can easily be moved into `cli::main` instead. See rust-lang#161277 for some further explanation of why having code in the crate root is not ideal. There should be no meaningful change to compiletest behaviour.
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 20, 2026
Rollup of 21 pull requests Successful merges: - #165707 (bootstrap: Make low priority the default) - #165716 (Refactor split_block in check_pointers to avoid Terminator: None) - #165934 (Avoid using Terminator:None in simplify_cfg) - #166050 (Use attribute parser for lang attributes in `LateResolutionVisitor`) - #166069 (bootstrap: fix keep-stage-std) - #166117 (Remove ebadf handling from stdio) - #166119 (Avoid an ICE on re-exports of private imports without a DefId) - #165094 (reflection: doc attributes from adts, fields, and variants) - #165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected) - #165694 (view-types: make sure view types are !Sized) - #165802 (Add CI workflow to publish backtrace after a push to main) - #165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector) - #165906 (fix ICE when a forced keyword follows a parameter pattern) - #166064 (Add const generic transmute min support) - #166136 (Move ub_checks() inside the const_eval_select branch.) - #166158 (bump some tools' `toml` dependency) - #166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`) - #166176 (compiletest: Move all code out of the crate root) - #166185 (simd-test: Fix cfg syntax in the test macro) - #166194 (std: Unstably constify `std::process::abort`) - #166210 (Avoid terminator: None in insert_direct_enum_check) Failed merges: - #166150 (Reflection: refactor Type and TypeKind) - #166160 (refactor CTFE-specific intrinsics to different file)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 20, 2026
Rollup of 20 pull requests Successful merges: - #165716 (Refactor split_block in check_pointers to avoid Terminator: None) - #165934 (Avoid using Terminator:None in simplify_cfg) - #166050 (Use attribute parser for lang attributes in `LateResolutionVisitor`) - #166069 (bootstrap: fix keep-stage-std) - #166117 (Remove ebadf handling from stdio) - #166119 (Avoid an ICE on re-exports of private imports without a DefId) - #165094 (reflection: doc attributes from adts, fields, and variants) - #165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected) - #165694 (view-types: make sure view types are !Sized) - #165802 (Add CI workflow to publish backtrace after a push to main) - #165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector) - #165906 (fix ICE when a forced keyword follows a parameter pattern) - #166064 (Add const generic transmute min support) - #166136 (Move ub_checks() inside the const_eval_select branch.) - #166158 (bump some tools' `toml` dependency) - #166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`) - #166176 (compiletest: Move all code out of the crate root) - #166185 (simd-test: Fix cfg syntax in the test macro) - #166194 (std: Unstably constify `std::process::abort`) - #166210 (Avoid terminator: None in insert_direct_enum_check) Failed merges: - #166150 (Reflection: refactor Type and TypeKind) - #166160 (refactor CTFE-specific intrinsics to different file)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 20, 2026
Rollup merge of #166176 - Zalathar:discover, r=jieyouxu compiletest: Move all code out of the crate root Most of the code in the compiletest crate root is specifically related to test discovery, and the code that isn't can easily be moved into `cli::main` instead. See #161277 for some further explanation of why having code in the crate root is not ideal. There should be no meaningful change to compiletest behaviour.
folkertdev
pushed a commit
to folkertdev/stdarch
that referenced
this pull request
Nov 22, 2026
Rollup of 20 pull requests Successful merges: - rust-lang/rust#165716 (Refactor split_block in check_pointers to avoid Terminator: None) - rust-lang/rust#165934 (Avoid using Terminator:None in simplify_cfg) - rust-lang/rust#166050 (Use attribute parser for lang attributes in `LateResolutionVisitor`) - rust-lang/rust#166069 (bootstrap: fix keep-stage-std) - rust-lang/rust#166117 (Remove ebadf handling from stdio) - rust-lang/rust#166119 (Avoid an ICE on re-exports of private imports without a DefId) - rust-lang/rust#165094 (reflection: doc attributes from adts, fields, and variants) - rust-lang/rust#165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected) - rust-lang/rust#165694 (view-types: make sure view types are !Sized) - rust-lang/rust#165802 (Add CI workflow to publish backtrace after a push to main) - rust-lang/rust#165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector) - rust-lang/rust#165906 (fix ICE when a forced keyword follows a parameter pattern) - rust-lang/rust#166064 (Add const generic transmute min support) - rust-lang/rust#166136 (Move ub_checks() inside the const_eval_select branch.) - rust-lang/rust#166158 (bump some tools' `toml` dependency) - rust-lang/rust#166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`) - rust-lang/rust#166176 (compiletest: Move all code out of the crate root) - rust-lang/rust#166185 (simd-test: Fix cfg syntax in the test macro) - rust-lang/rust#166194 (std: Unstably constify `std::process::abort`) - rust-lang/rust#166210 (Avoid terminator: None in insert_direct_enum_check) Failed merges: - rust-lang/rust#166150 (Reflection: refactor Type and TypeKind) - rust-lang/rust#166160 (refactor CTFE-specific intrinsics to different file)
fs-rachel
added a commit
to ferrocene/ferrocene
that referenced
this pull request
Nov 26, 2026
A bunch of code was relocated from src/tools/compiletest/src/lib.rs to src/tools/compiletest/src/discovery.rs by rust-lang/rust#166176 . I found the differences we had applied to the moved code by running `git diff -R origin/main 5060a3e -- src/tools/compiletest/src/lib.rs` and manually re-applied them in the new location
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Most of the code in the compiletest crate root is specifically related to test discovery, and the code that isn't can easily be moved into
cli::maininstead.See #161277 for some further explanation of why having code in the crate root is not ideal.
There should be no meaningful change to compiletest behaviour.