rust/compiler
Dylan DPC 493ed7a6af
Rollup merge of #94433 - Urgau:check-cfg-allowness, r=petrochenkov
Improve allowness of the unexpected_cfgs lint

This pull-request improve the allowness (`#[allow(...)]`) of the `unexpected_cfgs` lint.

Before this PR only crate level `#![allow(unexpected_cfgs)]` worked, now with this PR it also work when put around `cfg!` or if it is in a upper level. Making it work ~for the attributes `cfg`, `cfg_attr`, ...~ for the same level is awkward as the current code is design to give "Some parent node that is close to this macro call" (cf. https://doc.rust-lang.org/nightly/nightly-rustc/rustc_expand/base/struct.ExpansionData.html) meaning that allow on the same line as an attribute won't work. I'm note even sure if this would be possible.

Found while working on https://github.com/rust-lang/rust/pull/94298.
r? ````````@petrochenkov````````
2022-03-03 01:09:12 +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
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 rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_codegen_llvm rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_codegen_ssa Rollup merge of #94433 - Urgau:check-cfg-allowness, r=petrochenkov 2022-03-03 01:09:12 +01:00
rustc_const_eval rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_data_structures Auto merge of #94514 - matthiaskrgr:rollup-pdzn82h, r=matthiaskrgr 2022-03-02 05:32:00 +00:00
rustc_driver rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_error_codes Rollup merge of #94449 - GuillaumeGomez:explanation-e0726, r=Urgau 2022-02-28 20:05:18 +01:00
rustc_errors rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_expand Rollup merge of #94433 - Urgau:check-cfg-allowness, r=petrochenkov 2022-03-03 01:09:12 +01:00
rustc_feature
rustc_fs_util
rustc_graphviz
rustc_hir compiler: fix some typos 2022-03-01 20:02:47 +08:00
rustc_hir_pretty
rustc_incremental rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_index
rustc_infer rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_interface Rollup merge of #94433 - Urgau:check-cfg-allowness, r=petrochenkov 2022-03-03 01:09:12 +01:00
rustc_lexer
rustc_lint Rollup merge of #94397 - xFrednet:69838-deprecate-pre-expansion, r=cjgillot 2022-02-27 21:46:34 +01:00
rustc_lint_defs
rustc_llvm Auto merge of #94229 - erikdesjardins:rem2, r=nikic 2022-03-02 08:48:33 +00:00
rustc_log
rustc_macros rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_metadata Improve allowness of the unexpected_cfgs lint 2022-03-01 14:29:12 +01:00
rustc_middle Rollup merge of #94375 - WaffleLapkin:copy-suggestion, r=estebank 2022-03-03 01:09:11 +01:00
rustc_mir_build rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_mir_dataflow
rustc_mir_transform 7 - Make more use of let_chains 2022-03-01 07:43:12 -03:00
rustc_monomorphize rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_parse rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_parse_format
rustc_passes Rollup merge of #94448 - c410-f3r:yet-more-let-chains, r=estebank 2022-03-01 03:41:52 +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 rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_save_analysis
rustc_serialize
rustc_session rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
rustc_span Auto merge of #94427 - cjgillot:inline-fresh-expn, r=oli-obk 2022-02-28 08:25:26 +00:00
rustc_symbol_mangling Rollup merge of #94359 - tmiasko:legacy-verbose-const, r=petrochenkov 2022-03-01 12:00:43 +01:00
rustc_target Auto merge of #94216 - psumbera:sparc64-abi-fix2, r=nagisa 2022-02-28 11:54:17 +00:00
rustc_trait_selection rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06: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 #93072 - m-ou-se:compatible-variants-suggestion-with-desugaring, r=estebank 2022-03-03 01:09:08 +01:00