Skip to content

Cleanup rmeta::MacroDef#66364

Merged
bors merged 7 commits intorust-lang:masterfrom
Centril:cleanup-macro-def
Mar 10, 2020
Merged

Cleanup rmeta::MacroDef#66364
bors merged 7 commits intorust-lang:masterfrom
Centril:cleanup-macro-def

Conversation

@Centril
Copy link
Contributor

@Centril Centril commented Nov 13, 2019

Avoid using rountrip parsing in the encoder and in fn load_macro_untracked.

The main reason I was interested in this was to remove rustc_parse as a dependency of rustc_metadata but it seems like this had other benefits as well.

Fixes #49511.

r? @eddyb
cc @matthewjasper @estebank @petrochenkov

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 13, 2019
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall though I think this is reasonable, I guess :)

@rust-highfive

This comment has been minimized.

@bors

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@petrochenkov petrochenkov self-assigned this Nov 13, 2019
@bors

This comment has been minimized.

@Centril
Copy link
Contributor Author

Centril commented Nov 14, 2019

All the tests passed (before I adjusted the comment), so this should be ready for review now. :)

@rust-highfive

This comment has been minimized.

@eddyb

This comment has been minimized.

@Centril Centril 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-review Status: Awaiting review from the assignee but also interested parties. labels Nov 15, 2019
@petrochenkov petrochenkov added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 16, 2019
@Centril Centril added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 17, 2019
@petrochenkov petrochenkov removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 17, 2019
@petrochenkov petrochenkov removed their assignment Nov 17, 2019
@petrochenkov
Copy link
Contributor

Do not forget to run perf on this.
Stringification was a cheat, but it could be a performance-friendly cheat.

@Centril
Copy link
Contributor Author

Centril commented Nov 21, 2019

Let's try a perf run now (and maybe one later after doing some more changes according to #66364 (comment)):

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Collaborator

bors commented Nov 21, 2019

⌛ Trying commit a2ec40b4bf40b57c3df20d4c679804812d3be8e6 with merge 8391cac23555ae55fb9f4d7fc909c58c3f1313bf...

@Centril
Copy link
Contributor Author

Centril commented Mar 10, 2020

@bors retry

@bors
Copy link
Collaborator

bors commented Mar 10, 2020

⌛ Testing commit bafa5cc with merge 7736d6d4c0c6ca1c4028ac34b424375d0a4f8068...

@rust-highfive
Copy link
Contributor

Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@bors
Copy link
Collaborator

bors commented Mar 10, 2020

💔 Test failed - checks-azure

@Centril
Copy link
Contributor Author

Centril commented Mar 10, 2020

@bors retry

@bors
Copy link
Collaborator

bors commented Mar 10, 2020

⌛ Testing commit bafa5cc with merge c6224a4e9dbab86d6b743397f3c64dad86098a9f...

@Centril
Copy link
Contributor Author

Centril commented Mar 10, 2020

@bors retry

@rust-highfive
Copy link
Contributor

Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@bors
Copy link
Collaborator

bors commented Mar 10, 2020

⌛ Testing commit bafa5cc with merge 5cffb60e74b9d4dca3beef2dd4ba4913a848a7e1...

@emilyalbini
Copy link
Member

@bors retry

Yield to the beta release

@bors
Copy link
Collaborator

bors commented Mar 10, 2020

⌛ Testing commit bafa5cc with merge 1581278...

@bors
Copy link
Collaborator

bors commented Mar 10, 2020

☀️ Test successful - checks-azure
Approved by: petrochenkov,eddyb
Pushing 1581278 to master...

@Mark-Simulacrum
Copy link
Member

Tagging as relnotes (so we don't forget about it -- it may not go into the final version), though that may be a false positive. @tomaka reported some breakage here (https://twitter.com/tomaka17/status/1238204339505770499) though it may be entirely in unstable features and unobservable on stable, in which case we wouldn't need to document it in relnotes.

@eddyb tells me @petrochenkov is the person to ask on whether there's something to say in relnotes here :)

@Mark-Simulacrum
Copy link
Member

Further discussion on Discord informed me that perhaps there is not a significant change here and the only exposed changes are to unstable APIs in proc_macro anyway, so untagging.

@petrochenkov
Copy link
Contributor

Spans can affect many things, starting from lints (as this PR itself shows).
I guess the beta crater run will show the full extent of changes this PR caused.

@petrochenkov
Copy link
Contributor

Actually, running a separate crater check for this PR would be reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macro_rules macros should not be serialized through strings in crate metadata.