Rollup merge of #131729 - Urgau:check-cfg-test-userspace, r=petrochenkov
Make the `test` cfg a userspace check-cfg This PR implements MCP https://github.com/rust-lang/compiler-team/issues/785, which makes the `test` cfg a "userspace" check-cfg, i.e. no longer included in the well known cfg list. Things to do: - [x] Accept the MCP (https://github.com/rust-lang/compiler-team/issues/785#issuecomment-2424121886) - [x] Mark `test` in Cargo (https://github.com/rust-lang/cargo/pull/14963) `@rustbot` labels +S-waiting-on-MCP +F-check_cfg r? `@petrochenkov`
This commit is contained in:
commit
8439ae7422
36 changed files with 73 additions and 66 deletions
|
@ -332,6 +332,11 @@ impl CheckCfg {
|
|||
// Note that symbols inserted conditionally in `default_configuration`
|
||||
// are inserted unconditionally here.
|
||||
//
|
||||
// One exception is the `test` cfg which is consider to be a "user-space"
|
||||
// cfg, despite being also set by in `default_configuration` above.
|
||||
// It allows the build system to "deny" using the config by not marking it
|
||||
// as expected (e.g. `lib.test = false` for Cargo).
|
||||
//
|
||||
// When adding a new config here you should also update
|
||||
// `tests/ui/check-cfg/well-known-values.rs` (in order to test the
|
||||
// expected values of the new config) and bless the all directory.
|
||||
|
@ -453,8 +458,6 @@ impl CheckCfg {
|
|||
|
||||
ins!(sym::target_thread_local, no_values);
|
||||
|
||||
ins!(sym::test, no_values);
|
||||
|
||||
ins!(sym::ub_checks, no_values);
|
||||
|
||||
ins!(sym::unix, no_values);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue