-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cleanup: Remove Spanned
where possible
#63586
Conversation
/// Represents a macro invocation. The `Path` indicates which macro | ||
/// is being invoked, and the vector of token-trees contains the source | ||
/// of the macro invocation. | ||
/// | ||
/// N.B., the additional ident for a `macro_rules`-style macro is actually | ||
/// stored in the enclosing item. | ||
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] | ||
pub struct Mac_ { | ||
pub struct Mac { |
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.
By this point we can probably rename this to MacroInvocation
or MacroCall
.
(but it doesn't need to be in this PR)
@bors r+ |
📌 Commit 3fed181b5326ad50695c72663c65ab9ff10e6af6 has been approved by |
Nice change. ...But the PR builder seems unhappy? @bors r- |
3fed181
to
a618271
Compare
@bors r=eddyb |
📌 Commit a618271 has been approved by |
cleanup: Remove `Spanned` where possible It generally only makes sense on enums, otherwise it's more convenient to "flatten" it by adding a span field to the struct it wraps.
cleanup: Remove `Spanned` where possible It generally only makes sense on enums, otherwise it's more convenient to "flatten" it by adding a span field to the struct it wraps.
Rollup of 9 pull requests Successful merges: - #63155 (Add UWP MSVC targets) - #63165 (Add builtin targets for mips64(el)-unknown-linux-muslabi64) - #63306 (Adapt AddRetag for shallow retagging) - #63467 (Add Catalyst (iOS apps running on macOS) target) - #63546 (Remove uses of `mem::uninitialized()` from cloudabi) - #63572 (remove unused Level::PhaseFatal) - #63577 (Test HRTB issue accepted by compiler) - #63582 (Fix ICE #63226) - #63586 (cleanup: Remove `Spanned` where possible) Failed merges: r? @ghost
☔ The latest upstream changes (presumably #63592) made this pull request unmergeable. Please resolve the merge conflicts. |
Rustup "Remove `Spanned` from `{ast,hir}::FieldPat`" Rustup rust-lang/rust#63586 changelog: none
ast: `Mac`/`Macro` -> `MacCall` It's now obvious that these refer to macro calls rather than to macro definitions. It's also a single name instead of two different names in different places. `rustc_expand` usually calls macro calls in a wide sense (including attributes and derives) "macro invocations", but structures and variants renamed in this PR are only relevant to fn-like macros, so it's simpler and clearer to just call them calls. cc rust-lang#63586 (comment) r? @eddyb
ast: `Mac`/`Macro` -> `MacCall` It's now obvious that these refer to macro calls rather than to macro definitions. It's also a single name instead of two different names in different places. `rustc_expand` usually calls macro calls in a wide sense (including attributes and derives) "macro invocations", but structures and variants renamed in this PR are only relevant to fn-like macros, so it's simpler and clearer to just call them calls. cc rust-lang#63586 (comment) r? @eddyb
ast: `Mac`/`Macro` -> `MacCall` It's now obvious that these refer to macro calls rather than to macro definitions. It's also a single name instead of two different names in different places. `rustc_expand` usually calls macro calls in a wide sense (including attributes and derives) "macro invocations", but structures and variants renamed in this PR are only relevant to fn-like macros, so it's simpler and clearer to just call them calls. cc rust-lang#63586 (comment) r? @eddyb
ast: `Mac`/`Macro` -> `MacCall` It's now obvious that these refer to macro calls rather than to macro definitions. It's also a single name instead of two different names in different places. `rustc_expand` usually calls macro calls in a wide sense (including attributes and derives) "macro invocations", but structures and variants renamed in this PR are only relevant to fn-like macros, so it's simpler and clearer to just call them calls. cc rust-lang#63586 (comment) r? @eddyb
It generally only makes sense on enums, otherwise it's more convenient to "flatten" it by adding a span field to the struct it wraps.