1
Fork 0
rust/compiler
Nilstrieb aff407eef5
Rollup merge of #117522 - Urgau:check-cfg-cli-own-lint, r=petrochenkov
Remove `--check-cfg` checking of command line `--cfg` args

Back in https://github.com/rust-lang/rust/pull/100574 we added to the `unexpected_cfgs` lint the checking of `--cfg` CLI arguments and emitted unexpected names and values for them.

The implementation works as expected, but it's usability in particular when using it in combination with Cargo+`RUSTFLAGS` as people who set `RUSTFLAGS=--cfg=tokio_unstable` (or whatever) have `unexpected_cfgs` warnings on all of their crates is debatable. ~~To fix this issue this PR proposes that we split the CLI argument checking into it's own separate allow-by-default lint: `unexpected_cli_cfgs`.~~

~~This has the advantage of letting people who want CLI warnings have them (although not by default anymore), while still linting on every unexpected cfg name and values in the code.~~

After some discussion with the Cargo team ([Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/check-cfg.20and.20RUSTFLAGS.20interaction)) and member of the compiler team (see below), I propose that we follow the suggestion from `@epage:` never check `--cfg` arguments, but still reserve us the possibility to do it later.

We would still lint on unexpected cfgs found in the source code no matter the `--cfg` args passed. This mean reverting https://github.com/rust-lang/rust/pull/100574 but NOT https://github.com/rust-lang/rust/pull/99519.

r? `@petrochenkov`
2023-11-21 14:36:13 +01:00
..
rustc Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_abi Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_arena Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_ast Add HashStable_NoContext to simplify HashStable implementations in rustc_type_ir 2023-11-21 05:49:44 +00:00
rustc_ast_lowering Rollup merge of #117549 - DaniPopes:more-copied, r=b-naber 2023-11-17 23:04:22 +01:00
rustc_ast_passes Re-format code with new rustfmt 2023-11-15 21:45:48 -05:00
rustc_ast_pretty More detail when expecting expression but encountering bad macro argument 2023-11-16 16:19:04 +00:00
rustc_attr Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_baked_icu_data Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_borrowck Rollup merge of #117835 - Nilstrieb:note-object-lifetime-defaults, r=compiler-errors 2023-11-20 20:56:40 +01:00
rustc_builtin_macros Re-format code with new rustfmt 2023-11-15 21:45:48 -05:00
rustc_codegen_cranelift Merge commit 'def04540a4' into sync_cg_clif-2023-11-16 2023-11-16 21:15:07 +00:00
rustc_codegen_gcc Pass TyCtxt by value 2023-11-19 14:04:40 -05:00
rustc_codegen_llvm Auto merge of #117500 - RalfJung:aggregate-abi, r=davidtwco 2023-11-19 18:42:20 +00:00
rustc_codegen_ssa Auto merge of #118082 - compiler-errors:rollup-ejsc8yd, r=matthiaskrgr 2023-11-20 11:24:28 +00:00
rustc_const_eval Rollup merge of #117832 - RalfJung:interpret-shift, r=cjgillot 2023-11-19 19:14:33 -08:00
rustc_data_structures Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_driver Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_driver_impl Auto merge of #118002 - nnethercote:unify-input-no-input, r=bjorn3 2023-11-18 16:43:47 +00:00
rustc_error_codes Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_error_messages Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_errors Auto merge of #115691 - jsgf:typed-json-diags, r=est31,dtolnay 2023-11-21 06:30:14 +00:00
rustc_expand More detail when expecting expression but encountering bad macro argument 2023-11-16 16:19:04 +00:00
rustc_feature Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_fluent_macro Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_fs_util Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_graphviz Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_hir Use macros to avoid expect_* boilerplate. 2023-11-21 15:36:15 +11:00
rustc_hir_analysis Rollup merge of #118000 - compiler-errors:placeholder-ty-outlives, r=aliemjay 2023-11-19 19:14:35 -08:00
rustc_hir_pretty Fix remaining uses of CaptureBy::Value 2023-11-04 19:48:44 +01:00
rustc_hir_typeck Rollup merge of #118010 - gurry:117821-ice-no-type-for-local-var, r=compiler-errors 2023-11-20 20:56:42 +01:00
rustc_incremental Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_index Begin nightly-ifying rustc_type_ir 2023-11-18 00:20:00 +00:00
rustc_index_macros Begin nightly-ifying rustc_type_ir 2023-11-18 00:20:00 +00:00
rustc_infer Don't require intercrate mode for negative coherence 2023-11-20 18:49:48 +00:00
rustc_interface Make Compiler::sess private. 2023-11-17 17:30:41 +11:00
rustc_lexer Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_lint Rollup merge of #117522 - Urgau:check-cfg-cli-own-lint, r=petrochenkov 2023-11-21 14:36:13 +01:00
rustc_lint_defs Remove --check-cfg checking of --cfg args 2023-11-18 12:21:58 +01:00
rustc_llvm Auto merge of #117875 - Mark-Simulacrum:bootstrap-bump, r=clubby789 2023-11-16 12:45:27 +00:00
rustc_log rustc_log: provide a way to init logging based on the values, not names, of the env vars 2023-11-11 15:24:33 +01:00
rustc_macros Unify HashStable implementations 2023-11-21 05:49:45 +00:00
rustc_metadata Store feature stability un-split 2023-11-20 19:11:26 +00:00
rustc_middle Rollup merge of #118121 - nnethercote:rustc_hir, r=compiler-errors 2023-11-21 09:06:30 +01:00
rustc_mir_build Rollup merge of #117832 - RalfJung:interpret-shift, r=cjgillot 2023-11-19 19:14:33 -08:00
rustc_mir_dataflow rename BorrowKind::Shallow to Fake 2023-11-08 22:55:28 +01:00
rustc_mir_transform Auto merge of #117783 - tmiasko:inline-ret, r=cjgillot 2023-11-20 09:25:26 +00:00
rustc_monomorphize Minimize pub usage in source_map.rs. 2023-11-02 19:35:00 +11:00
rustc_parse Rollup merge of #117988 - estebank:issue-106020, r=cjgillot 2023-11-19 19:14:34 -08:00
rustc_parse_format Auto merge of #117819 - fmease:rustc_parse_format-stable-rustc, r=Nilstrieb 2023-11-15 14:55:35 +00:00
rustc_passes Store feature stability un-split 2023-11-20 19:11:26 +00:00
rustc_privacy Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_query_impl Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_query_system Add HashStable_NoContext to simplify HashStable implementations in rustc_type_ir 2023-11-21 05:49:44 +00:00
rustc_resolve fix rebase 2023-11-19 18:07:22 +00:00
rustc_serialize Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_session change smir to StableMir 2023-11-17 13:28:07 +03:00
rustc_smir Improve code per PR comments 2023-11-20 12:46:14 -08:00
rustc_span Remove option_payload_ptr; redundant to offset_of 2023-11-16 22:56:25 +00:00
rustc_symbol_mangling Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_target Auto merge of #115526 - arttet:master, r=jackh726 2023-11-20 03:11:17 +00:00
rustc_trait_selection Rollup merge of #118115 - spastorino:fix-old-fn-names, r=compiler-errors 2023-11-21 09:06:30 +01:00
rustc_traits Remove -Zperf-stats. 2023-11-13 09:45:20 +11:00
rustc_transmute Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_ty_utils Rollup merge of #118115 - spastorino:fix-old-fn-names, r=compiler-errors 2023-11-21 09:06:30 +01:00
rustc_type_ir Add HashStable_NoContext to simplify HashStable implementations in rustc_type_ir 2023-11-21 05:49:44 +00:00
stable_mir Improve code per PR comments 2023-11-20 12:46:14 -08:00