rust/compiler
Dylan DPC afa85f0841
Rollup merge of #94362 - Urgau:check-cfg-values, r=petrochenkov
Add well known values to `--check-cfg` implementation

This pull-request adds well known values for the well known names via `--check-cfg=values()`.

[RFC 3013: Checking conditional compilation at compile time](https://rust-lang.github.io/rfcs/3013-conditional-compilation-checking.html#checking-conditional-compilation-at-compile-time) doesn't define this at all, but this seems a nice improvement.
The activation is done by a empty `values()` (new syntax) similar to `names()` except that `names(foo)` also activate well known names while `values(aa, "aa", "kk")` would not.

As stated this use a different activation logic because well known values for the well known names are not always sufficient.
In fact this is problematic for every `target_*` cfg because of non builtin targets, as the current implementation use those built-ins targets to create the list the well known values.

The implementation is straight forward, first we gather (if necessary) all the values (lazily or not) and then we apply them.

r? ```@petrochenkov```
2022-03-04 22:58:34 +01:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast 2 - Make more use of let_chains 2022-02-26 13:45:43 -03:00
rustc_ast_lowering compiler: fix some typos 2022-03-01 20:02:47 +08:00
rustc_ast_passes Gate stability attrs with other attributes. 2022-03-03 18:50:26 +01:00
rustc_ast_pretty
rustc_attr Improve allowness of the unexpected_cfgs lint 2022-03-01 14:29:12 +01:00
rustc_borrowck Rollup merge of #94375 - WaffleLapkin:copy-suggestion, r=estebank 2022-03-03 01:09:11 +01:00
rustc_builtin_macros Rollup merge of #94433 - Urgau:check-cfg-allowness, r=petrochenkov 2022-03-03 01:09:12 +01:00
rustc_codegen_cranelift rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_codegen_gcc all: fix some typos 2022-03-03 19:47:23 +08:00
rustc_codegen_llvm Auto merge of #94539 - tmiasko:string-attributes, r=nikic 2022-03-04 10:38:11 +00:00
rustc_codegen_ssa Rollup merge of #94339 - Amanieu:arm-d32, r=nagisa 2022-03-04 02:06:40 +01:00
rustc_const_eval Rollup merge of #94575 - RalfJung:switchint-comment, r=oli-obk 2022-03-04 02:06:43 +01:00
rustc_data_structures Auto merge of #94514 - matthiaskrgr:rollup-pdzn82h, r=matthiaskrgr 2022-03-02 05:32:00 +00:00
rustc_driver Rollup merge of #93913 - bjorn3:remove_everybody_loops, r=jackh726 2022-03-04 02:06:38 +01:00
rustc_error_codes Rollup merge of #94555 - cuishuang:master, r=oli-obk 2022-03-03 20:01:48 +01:00
rustc_errors Auto merge of #87835 - xFrednet:rfc-2383-expect-attribute-with-ids, r=wesleywiser 2022-03-03 18:59:32 +00:00
rustc_expand Auto merge of #94096 - cjgillot:ensure-stability, r=lcnr 2022-03-04 05:49:14 +00:00
rustc_feature Auto merge of #94096 - cjgillot:ensure-stability, r=lcnr 2022-03-04 05:49:14 +00:00
rustc_fs_util
rustc_graphviz
rustc_hir compiler: fix some typos 2022-03-01 20:02:47 +08:00
rustc_hir_pretty
rustc_incremental all: fix some typos 2022-03-03 19:47:23 +08:00
rustc_index
rustc_infer Rollup merge of #94555 - cuishuang:master, r=oli-obk 2022-03-03 20:01:48 +01:00
rustc_interface Rollup merge of #94362 - Urgau:check-cfg-values, r=petrochenkov 2022-03-04 22:58:34 +01:00
rustc_lexer
rustc_lint Auto merge of #87835 - xFrednet:rfc-2383-expect-attribute-with-ids, r=wesleywiser 2022-03-03 18:59:32 +00:00
rustc_lint_defs Address review comments 2022-03-02 17:46:12 +01:00
rustc_llvm Pass LLVM string attributes as string slices 2022-03-03 00:28:50 +01:00
rustc_log
rustc_macros Make Ord, PartialOrd opt-out in newtype_index 2022-03-03 11:52:40 -06:00
rustc_metadata Rollup merge of #94057 - lcnr:simplify_type-uwu, r=nikomatsakis 2022-03-03 20:01:44 +01:00
rustc_middle Auto merge of #94570 - shampoofactory:reopen-91719, r=workingjubilee 2022-03-04 13:06:14 +00:00
rustc_mir_build rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_mir_dataflow
rustc_mir_transform Auto merge of #94512 - RalfJung:sdiv-ub, r=oli-obk 2022-03-03 12:56:24 +00:00
rustc_monomorphize rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_parse Do not recover from Ty? in macro parsing 2022-03-04 02:03:55 +00:00
rustc_parse_format
rustc_passes Make unknown feature error deterministic. 2022-03-03 18:50:28 +01:00
rustc_plugin_impl
rustc_privacy
rustc_query_impl Auto merge of #94084 - Mark-Simulacrum:drop-sharded, r=cjgillot 2022-02-27 14:04:07 +00:00
rustc_query_system rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_resolve remove a unnecessary .. pattern 2022-03-04 00:57:38 +09:00
rustc_save_analysis
rustc_serialize
rustc_session Rollup merge of #94362 - Urgau:check-cfg-values, r=petrochenkov 2022-03-04 22:58:34 +01:00
rustc_span Rollup merge of #94362 - Urgau:check-cfg-values, r=petrochenkov 2022-03-04 22:58:34 +01:00
rustc_symbol_mangling Rollup merge of #94359 - tmiasko:legacy-verbose-const, r=petrochenkov 2022-03-01 12:00:43 +01:00
rustc_target Rollup merge of #94362 - Urgau:check-cfg-values, r=petrochenkov 2022-03-04 22:58:34 +01:00
rustc_trait_selection Rollup merge of #94057 - lcnr:simplify_type-uwu, r=nikomatsakis 2022-03-03 20:01:44 +01:00
rustc_traits
rustc_ty_utils rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_type_ir
rustc_typeck Rollup merge of #93913 - bjorn3:remove_everybody_loops, r=jackh726 2022-03-04 02:06:38 +01:00