Add {ignore,needs}-{rustc,std}-debug-assertions directive support#131913
Add {ignore,needs}-{rustc,std}-debug-assertions directive support#131913bors merged 3 commits intorust-lang:masterfrom
{ignore,needs}-{rustc,std}-debug-assertions directive support#131913Conversation
| @@ -1,6 +1,7 @@ | |||
| //@ compile-flags: -O -C no-prepopulate-passes | |||
| //@ only-x86_64 (to not worry about usize differing) | |||
| //@ ignore-debug: precondition checks make mem::replace not a candidate for MIR inlining | |||
There was a problem hiding this comment.
Just to check: we have some lint or w/e that will fail CI if someone adds a test with ignore-debug as we merge this PR?
There was a problem hiding this comment.
compiletest (currently) has an allowlist of known directives, I've removed ignore-debug from that so compiletest will error if someone writes ignore-debug (should be in the first commit) which will fail locally and in CI. (This is current stopgap solution before fixing how directives are handled)
There was a problem hiding this comment.
It will fail looking like (I know it's not super user friendly)
Testing stage1 compiletest suite=ui mode=ui (x86_64-pc-windows-msvc)
error: detected unknown compiletest test directive `only-debug` in X:\repos\rust\tests\ui\print_type_sizes\niche-filling.rs:13
errors encountered during EarlyProps parsing: X:\repos\rust\tests\ui\print_type_sizes\niche-filling.rs
thread 'main' panicked at src\tools\compiletest\src\header.rs:68:13:
errors encountered during EarlyProps parsing
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
| "ignore-coverage-run", | ||
| "ignore-cross-compile", | ||
| "ignore-debug", | ||
| "ignore-debug-assertions-rustc", |
30e1d8a to
2653a4a
Compare
|
This PR modifies If appropriate, please update |
|
Accompanying rustc-dev-guide PR: rust-lang/rustc-dev-guide#2101 |
{ignore,needs}-debug-assertions-{rustc,std} directive support{ignore,needs}-{rustc,std}-debug-assertions directive support
| debug_assertions: Option<bool> = "debug-assertions", | ||
| rustc_debug_assertions: Option<bool> = "debug-assertions", | ||
| randomize_layout: Option<bool> = "randomize-layout", | ||
| debug_assertions_std: Option<bool> = "debug-assertions-std", | ||
| std_debug_assertions: Option<bool> = "debug-assertions-std", |
There was a problem hiding this comment.
I did not change the config.toml user-facing toml name.
2653a4a to
014191d
Compare
Changes since last review
|
|
@rustbot ready |
This comment was marked as resolved.
This comment was marked as resolved.
014191d to
c46a1ca
Compare
This comment has been minimized.
This comment has been minimized.
c46a1ca to
2021e10
Compare
|
Rebased and split compiletest/bootstrap changes into two commits, but no functional changes. @rustbot ready |
This comment was marked as resolved.
This comment was marked as resolved.
…ive support And retire the old `only-debug` directive which was ambiguous and only for std debug assertions.
And rename local variables and field names in bootstrap from
`debug_assertions{,_std}` -> `{rustc,std}-debug-assertions` to avoid
confusion where applicable.
2021e10 to
0d5cc8e
Compare
|
Rebased, no changes. |
|
r? bootstrap |
| //@ ignore-debug: precondition checks in ptr::read make them a bad candidate for MIR inlining | ||
| //@ ignore-std-debug-assertions | ||
| // Reason: precondition checks in ptr::read make them a bad candidate for MIR inlining |
There was a problem hiding this comment.
Can't the comment format be the same (without newline) as it was before? Or is it due to the tidy length check?
There was a problem hiding this comment.
Oh it definitely can be, but it gets quite long and I found it a bit easier to read on a different line.
There was a problem hiding this comment.
(and yes it would hit the tidy line length check lol)
|
@bors r+ |
…onur-ozkan
Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support
Add `{ignore,needs}-{rustc,std}-debug-assertions` compiletest directives and retire the old `{ignore,only}-debug` directives. The old `{ignore,only}-debug` directives were ambiguous because you could have std built with debug assertions but rustc not built with debug assertions or vice versa. If we want to support the use case of controlling test run based on if rustc was built with debug assertions, then having `{ignore,only}-debug` will be very confusing.
cc `@matthiaskrgr`
Closes rust-lang#123987.
r? bootstrap (or compiler tbh)
…onur-ozkan
Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support
Add `{ignore,needs}-{rustc,std}-debug-assertions` compiletest directives and retire the old `{ignore,only}-debug` directives. The old `{ignore,only}-debug` directives were ambiguous because you could have std built with debug assertions but rustc not built with debug assertions or vice versa. If we want to support the use case of controlling test run based on if rustc was built with debug assertions, then having `{ignore,only}-debug` will be very confusing.
cc ``@matthiaskrgr``
Closes rust-lang#123987.
r? bootstrap (or compiler tbh)
…llaumeGomez Rollup of 8 pull requests Successful merges: - rust-lang#130586 (Set "symbol name" in raw-dylib import libraries to the decorated name) - rust-lang#131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support) - rust-lang#132095 (Fix rust-lang#131977 parens mangled in shared mut static lint suggestion) - rust-lang#132131 ([StableMIR] API to retrieve definitions from crates) - rust-lang#132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config) - rust-lang#132738 (Initialize channel `Block`s directly on the heap) - rust-lang#132739 (Fix `librustdoc/scrape_examples.rs` formatting) - rust-lang#132740 (Update test for LLVM 20's new vector splat syntax) r? `@ghost` `@rustbot` modify labels: rollup
…onur-ozkan
Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support
Add `{ignore,needs}-{rustc,std}-debug-assertions` compiletest directives and retire the old `{ignore,only}-debug` directives. The old `{ignore,only}-debug` directives were ambiguous because you could have std built with debug assertions but rustc not built with debug assertions or vice versa. If we want to support the use case of controlling test run based on if rustc was built with debug assertions, then having `{ignore,only}-debug` will be very confusing.
cc ```@matthiaskrgr```
Closes rust-lang#123987.
r? bootstrap (or compiler tbh)
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#130586 (Set "symbol name" in raw-dylib import libraries to the decorated name) - rust-lang#131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support) - rust-lang#132095 (Fix rust-lang#131977 parens mangled in shared mut static lint suggestion) - rust-lang#132131 ([StableMIR] API to retrieve definitions from crates) - rust-lang#132639 (core: move intrinsics.rs into intrinsics folder) - rust-lang#132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config) - rust-lang#132737 (bootstrap: Print better message if lock pid isn't available) - rust-lang#132739 (Fix `librustdoc/scrape_examples.rs` formatting) - rust-lang#132740 (Update test for LLVM 20's new vector splat syntax) - rust-lang#132741 (Update mips64 data layout to match LLVM 20 change) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#131913 - jieyouxu:only_debug_assertions, r=onur-ozkan Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support Add `{ignore,needs}-{rustc,std}-debug-assertions` compiletest directives and retire the old `{ignore,only}-debug` directives. The old `{ignore,only}-debug` directives were ambiguous because you could have std built with debug assertions but rustc not built with debug assertions or vice versa. If we want to support the use case of controlling test run based on if rustc was built with debug assertions, then having `{ignore,only}-debug` will be very confusing. cc ````@matthiaskrgr```` Closes rust-lang#123987. r? bootstrap (or compiler tbh)
…onur-ozkan
Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support
Add `{ignore,needs}-{rustc,std}-debug-assertions` compiletest directives and retire the old `{ignore,only}-debug` directives. The old `{ignore,only}-debug` directives were ambiguous because you could have std built with debug assertions but rustc not built with debug assertions or vice versa. If we want to support the use case of controlling test run based on if rustc was built with debug assertions, then having `{ignore,only}-debug` will be very confusing.
cc ````@matthiaskrgr````
Closes rust-lang#123987.
r? bootstrap (or compiler tbh)
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#130586 (Set "symbol name" in raw-dylib import libraries to the decorated name) - rust-lang#131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support) - rust-lang#132095 (Fix rust-lang#131977 parens mangled in shared mut static lint suggestion) - rust-lang#132131 ([StableMIR] API to retrieve definitions from crates) - rust-lang#132639 (core: move intrinsics.rs into intrinsics folder) - rust-lang#132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config) - rust-lang#132737 (bootstrap: Print better message if lock pid isn't available) - rust-lang#132739 (Fix `librustdoc/scrape_examples.rs` formatting) - rust-lang#132740 (Update test for LLVM 20's new vector splat syntax) - rust-lang#132741 (Update mips64 data layout to match LLVM 20 change) r? `@ghost` `@rustbot` modify labels: rollup
Add
{ignore,needs}-{rustc,std}-debug-assertionscompiletest directives and retire the old{ignore,only}-debugdirectives. The old{ignore,only}-debugdirectives were ambiguous because you could have std built with debug assertions but rustc not built with debug assertions or vice versa. If we want to support the use case of controlling test run based on if rustc was built with debug assertions, then having{ignore,only}-debugwill be very confusing.cc @matthiaskrgr
Closes #123987.
r? bootstrap (or compiler tbh)