Skip to content
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

Merged
merged 3 commits into from
Aug 15, 2019
Merged

Conversation

petrochenkov
Copy link
Contributor

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.

@petrochenkov petrochenkov added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 15, 2019
/// 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 {
Copy link
Member

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)

@eddyb
Copy link
Member

eddyb commented Aug 15, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Aug 15, 2019

📌 Commit 3fed181b5326ad50695c72663c65ab9ff10e6af6 has been approved by eddyb

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 15, 2019
@Centril
Copy link
Contributor

Centril commented Aug 15, 2019

Nice change.

...But the PR builder seems unhappy? @bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 15, 2019
@petrochenkov
Copy link
Contributor Author

@bors r=eddyb
(Rustdoc updated.)

@bors
Copy link
Contributor

bors commented Aug 15, 2019

📌 Commit a618271 has been approved by eddyb

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 15, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019
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.
Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019
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.
bors added a commit that referenced this pull request Aug 15, 2019
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
@bors bors merged commit a618271 into rust-lang:master Aug 15, 2019
@bors
Copy link
Contributor

bors commented Aug 15, 2019

☔ The latest upstream changes (presumably #63592) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 15, 2019
bors added a commit to rust-lang/rust-clippy that referenced this pull request Aug 16, 2019
Rustup "Remove `Spanned` from `{ast,hir}::FieldPat`"

Rustup rust-lang/rust#63586

changelog: none
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Mar 5, 2020
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
Centril added a commit to Centril/rust that referenced this pull request Mar 7, 2020
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
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Mar 14, 2020
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
Centril added a commit to Centril/rust that referenced this pull request Mar 15, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants