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

Rollup of 6 pull requests #61713

Closed
wants to merge 26 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jun 10, 2019

Successful merges:

Failed merges:

r? @ghost

tobia and others added 26 commits April 13, 2019 01:24
It's a less powerful duplicate of `SyntaxExtension::NormalTT`
Changes:
````
travis: disable rls integration test.
rustup rust-lang#61669
Add OUTER_EXPN_INFO lint
````
This makes parsing faster, particularly for code with large constants,
for two reasons:
- it skips all the keyword comparisons for literals;
- it replaces the unnecessary `parse_literal_maybe_minus` call with
  `parse_lit`, avoiding an unnecessary allocation via `mk_expr`.
Replaced linear token counting macros with optimized implementation

There are currently two distinct token-counting macros in the source. Both implement the trivial algorithm, with linear complexity. They may or may not be adequate for their use case, but considering that other people are probably going to copy and paste them whenever they need a token-counting macro, I replaced them with an optimized implementation with logarithmic complexity.
…ddyb

Const qualification comments

I extracted some const-qualif knowledge from @eddyb. This is my attempt to turn that into comments.

Cc @oli-obk 	@eddyb
Remove some legacy proc macro flavors

Namely
- `IdentTT` (`foo! ident { ... }`). Can be replaced with `foo! { ident ... }` or something similar.
- `MultiDecorator`. Can be replaced by `MultiModifier` (aka `LegacyAttr` after renaming).
- `DeclMacro`. It was a less powerful duplicate of `NormalTT` (aka `LegacyBang` after renaming) and can be replaced by it.

Stuff like this slows down any attempts to refactor the expansion infra, so it's desirable to retire it already.
I'm not sure whether a lang team decision is necessary, but would be nice to land this sooner because I have some further work in this area scheduled.

The documentation commit (rust-lang@a9397fd) describes how the remaining variants are different from each other and shows that there's actually some system behind them.

The last commit renames variants of `SyntaxExtension` in more systematic way.
- `ProcMacro` -> `Bang`
- `NormalTT` -> `LegacyBang`
- `AttrProcMacro` -> `Attr`
- `MultiModifier` -> `LegacyAttr`
- `ProcMacroDerive` -> `Derive`
- `BuiltinDerive` -> `LegacyDerive`

All the `Legacy*` variants are AST-based, as opposed to "modern" token-based variants.
…pr, r=petrochenkov

Special-case literals in `parse_bottom_expr`.

This makes parsing faster, particularly for code with large constants,
for two reasons:
- it skips all the keyword comparisons for literals;
- it skips the allocation done by the `mk_expr` call in
  `parse_literal_maybe_minus`.

r? @petrochenkov
…hearth

submodules: update clippy from 71be6f6 to c0dbd34

Changes:
````
travis: disable rls integration test.
rustup rust-lang#61669
Add OUTER_EXPN_INFO lint
````

Should fix clippy toolstate
@Centril Centril closed this Jun 10, 2019
@Centril Centril deleted the rollup-jyj1wot branch June 10, 2019 10:01
@rust-highfive
Copy link
Collaborator

Your PR failed on Travis (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 @TimNN. (Feature Requests)

@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants