-
Notifications
You must be signed in to change notification settings - Fork 13.4k
expand: Some cleanup #82107
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
expand: Some cleanup #82107
Conversation
Maybe it was used before the introduction of placeholders, but now it has no effect.
Starting from rust-lang#63468 cfg attributes on variants, fields, fn params etc. are processed together with other attributes (via `configure!`).
@@ -1192,7 +1188,6 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> { | |||
} | |||
|
|||
fn visit_pat(&mut self, pat: &mut P<ast::Pat>) { | |||
self.cfg.configure_pat(pat); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find a configure!
call that configures patterns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patterns themselves do not support attributes (including cfg
attributes).
configure_pat
only configures fields in PatKind::Struct
which are already configure!
d in fn flat_map_field_pattern
.
In the future, we might want to try to unify the 'normal' cfg-expansion performed by Regardless, all of these changes look good to me. @bors r+ |
📌 Commit 6e11a8b has been approved by |
…as-schievink Rollup of 19 pull requests Successful merges: - rust-lang#81503 (Suggest to create a new `const` item if the `fn` in the array is a `const fn`) - rust-lang#81897 (Add match pattern diagnostics regression test) - rust-lang#81975 (Seal the CommandExt, OsStrExt and OsStringExt traits) - rust-lang#82009 (const_generics: Dont evaluate array length const when handling errors) - rust-lang#82060 (Fix typos in BTreeSet::{first, last} docs) - rust-lang#82061 (CTFE validation: catch ReadPointerAsBytes and better error) - rust-lang#82063 (Fixed minor typo in catch_unwind docs) - rust-lang#82067 (const_generics: Fix incorrect ty::ParamEnv::empty() usage) - rust-lang#82077 (Edit `rustc_arena::DropArena` docs) - rust-lang#82096 (Fix a typo) - rust-lang#82106 (Remove unnecessary `Option` in `default_doc`) - rust-lang#82107 (expand: Some cleanup) - rust-lang#82118 (Add missing env!-decl variant) - rust-lang#82119 (Fix typo in link to CreateSymbolicLinkW documentation.) - rust-lang#82120 (Stabilize Arguments::as_str) - rust-lang#82129 (Remove redundant bool_to_option feature gate) - rust-lang#82133 (Update link for extern prelude.) - rust-lang#82141 (32-bit ARM: Emit `lr` instead of `r14` when specified as an `asm!` output register.) - rust-lang#82147 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
See individual commits for details.
r? @Aaron1011