| Age | Commit message (Collapse) | Author | Lines |
|
`syntax_expand` -> `rustc_expand`
`syntax_pos` -> `rustc_span`
`syntax_ext` -> `rustc_builtin_macros`
|
|
|
|
2. mir::Mutability -> ast::Mutability.
|
|
|
|
Someone forgot to update the error message after `#[proc_macro]` and
`#[proc_macro_attribute]` were stabilized.
|
|
`AttrKind` is a new type with two variants, `Normal` and `DocComment`. It's a
big performance win (over 10% in some cases) because `DocComment` lets doc
comments (which are common) be represented very cheaply.
`Attribute` gets some new helper methods to ease the transition:
- `has_name()`: check if the attribute name matches a single `Symbol`; for
`DocComment` variants it succeeds if the symbol is `sym::doc`.
- `is_doc_comment()`: check if it has a `DocComment` kind.
- `{get,unwrap}_normal_item()`: extract the item from a `Normal` variant;
panic otherwise.
Fixes #60935.
|
|
This kind of thing just makes the code harder to read.
|
|
This is done by moving some data definitions to syntax::expand.
|
|
Change-Id: Ib3a396e7334d209fe6c6ef425bbfc7b2ae471378
|
|
Change-Id: Ib3a396e7334d209fe6c6ef425bbfc7b2ae471378
|
|
|
|
|
|
Instead just use `pprust::path_to_string(..)` where needed.
This has two benefits:
a) The AST definition is now independent of printing it.
(Therefore we get closer to extracting a data-crate.)
b) Debugging should be easier as program flow is clearer.
|
|
|
|
This ensures that we match the order used by proc macro metadata
serialization.
Fixes #64251
|
|
|
|
|
|
Use these to create call-site spans for AST passes when needed.
|
|
|
|
For naming consistency with everything else in this area
|
|
|
|
`Ident` has had a full span rather than just a `SyntaxContext` for a long time now.
|
|
Each call to `fully_expand_fragment` is something unique, interesting, and requiring attention.
It represents a "root" of expansion and its use means that something unusual is happening, like eager expansion or expansion performed outside of the primary expansion pass.
So, it shouldn't be hide under a generic visitor call.
Also, from all the implemented visitor methods only two were actually used.
|
|
|
|
MetaItem.span was always equivalent
|
|
Few other minor renamings for consistency.
Remove one unused dependency from `rustc_passes`.
Fix libsyntax tests.
Fix rebase.
|