| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2020-09-10 | Syntactically permit unsafety on mods | David Tolnay | -0/+89 | |
| 2020-08-03 | Stabilize Ident::new_raw | Aaron Hill | -0/+35 | |
| Tracking issue: #54723 This is a continuation of PR #59002 | ||||
| 2020-07-26 | Add test for serializing hygiene *into* a proc-macro crate | Aaron Hill | -1/+10 | |
| This is a very obscure corner case, and should never be hit in practice. | ||||
| 2020-07-01 | Rollup merge of #73569 - Aaron1011:fix/macro-rules-group, r=petrochenkov | Manish Goregaokar | -0/+33 | |
| Handle `macro_rules!` tokens consistently across crates When we serialize a `macro_rules!` macro, we used a 'lowered' `TokenStream` for its body, which has all `Nonterminal`s expanded in-place via `nt_to_tokenstream`. This matters when an 'outer' `macro_rules!` macro expands to an 'inner' `macro_rules!` macro - the inner macro may use tokens captured from the 'outer' macro in its definition. This means that invoking a foreign `macro_rules!` macro may use a different body `TokenStream` than when the same `macro_rules!` macro is invoked in the same crate. This difference is observable by proc-macros invoked by a `macro_rules!` macro - a `None`-delimited group will be seen in the same-crate case (inserted when convering `Nonterminal`s to the `proc_macro` crate's structs), but no `None`-delimited group in the cross-crate case. To fix this inconsistency, we now insert `None`-delimited groups when 'lowering' a `Nonterminal` `macro_rules!` body, just as we do in `proc_macro_server`. Additionally, we no longer print extra spaces for `None`-delimited groups - as far as pretty-printing is concerned, they don't exist (only their contents do). This ensures that `Display` output of a `TokenStream` does not depend on which crate a `macro_rules!` macro was invoked from. This PR is necessary in order to patch the `solana-genesis-programs` for the upcoming hygiene serialization breakage (https://github.com/rust-lang/rust/pull/72121#issuecomment-646924847). The `solana-genesis-programs` crate will need to use a proc macro to re-span certain tokens in a nested `macro_rules!`, which requires us to consistently use a `None`-delimited group. See `src/test/ui/proc-macro/nested-macro-rules.rs` for an example of the kind of nested `macro_rules!` affected by this crate. | ||||
| 2020-07-01 | Handle `None`-delimited groups when parsing `macro_rules!` macro | Aaron Hill | -0/+12 | |
| When a `macro_rules!` macro expands to another `macro_rules!` macro, we may see `None`-delimited groups in odd places when another crate deserializes the 'inner' macro. This commit 'unwraps' an outer `None`-delimited group to avoid breaking existing code. See https://github.com/rust-lang/rust/pull/73569#issuecomment-650860457 for more details. The proper fix is to handle `None`-delimited groups systematically throughout the parser, but that will require significant work. In the meantime, this hack lets us fix important hygiene bugs in macros | ||||
| 2020-07-01 | Insert NoDelim groups around nonterminals when lowering macro_rules | Aaron Hill | -0/+21 | |
| 2020-07-01 | expand: Stop using nonterminals for passing tokens to attribute and derive ↵ | Vadim Petrochenkov | -22/+21 | |
| macros | ||||
| 2020-06-30 | Add force-host to test aux file used by proc-macro | Aaron Hill | -0/+2 | |
| 2020-06-29 | Serialize all foreign `SourceFile`s into proc-macro crate metadata | Aaron Hill | -0/+22 | |
| Normally, we encode a `Span` that references a foreign `SourceFile` by encoding information about the foreign crate. When we decode this `Span`, we lookup the foreign crate in order to decode the `SourceFile`. However, this approach does not work for proc-macro crates. When we load a proc-macro crate, we do not deserialzie any of its dependencies (since a proc-macro crate can only export proc-macros). This means that we cannot serialize a reference to an upstream crate, since the associated metadata will not be available when we try to deserialize it. This commit modifies foreign span handling so that we treat all foreign `SourceFile`s as local `SourceFile`s when serializing a proc-macro. All `SourceFile`s will be stored into the metadata of a proc-macro crate, allowing us to cotinue to deserialize a proc-macro crate without needing to load any of its dependencies. Since the number of foreign `SourceFile`s that we load during a compilation session may be very large, we only serialize a `SourceFile` if we have also serialized a `Span` which requires it. | ||||
| 2020-06-15 | Always capture tokens for `macro_rules!` arguments | Aaron Hill | -0/+80 | |
| 2020-05-31 | test-macros: Avoid always producing errors in `#[derive(Print)]` | Vadim Petrochenkov | -1/+2 | |
| 2020-05-03 | Stabilize fn-like proc macros in expression, pattern and statement positions | Vadim Petrochenkov | -5/+2 | |
| 2020-04-26 | Stabilize `Span::mixed_site` | Vadim Petrochenkov | -1/+0 | |
| 2020-04-25 | Add a test for `Span::resolved_at` and `Span::located_at` | Vadim Petrochenkov | -0/+32 | |
| 2020-04-21 | proc_macro::is_available() | David Tolnay | -0/+14 | |
| 2020-03-24 | resolve: Remove `rustc_attrs` as a standalone feature gate | Vadim Petrochenkov | -0/+32 | |
| Now it only gates specific built-in attributes | ||||
| 2020-03-11 | fix expand-to-unstable test | Ralf Jung | -1/+1 | |
| 2020-02-17 | Add a test for proc macro generating `$ IDENT` | Vadim Petrochenkov | -0/+17 | |
| 2020-02-01 | Add tests for issue 59191 | David Ross | -0/+16 | |
| 2019-11-19 | resolve: Give derive helpers highest priority during resolution | Vadim Petrochenkov | -0/+12 | |
| 2019-11-16 | Add some more tests | Vadim Petrochenkov | -0/+15 | |
| 2019-10-15 | Test basic hygiene for `macro_rules` produced by transparent macros | Vadim Petrochenkov | -0/+23 | |
| 2019-10-15 | Stabilize proc macros generating `macro_rules` items | Vadim Petrochenkov | -35/+0 | |
| 2019-10-03 | proc_macro: Add `Span::mixed_site` exposing `macro_rules` hygiene | Vadim Petrochenkov | -0/+42 | |
| 2019-09-30 | Stabilize macros in `extern` blocks | Vadim Petrochenkov | -26/+0 | |
| Add some tests for macros in extern blocks, remove duplicate tests | ||||
| 2019-08-27 | Respect attributes on proc macro definitions | Vadim Petrochenkov | -0/+23 | |
| 2019-08-25 | pprust: Do not print spaces before some tokens | Vadim Petrochenkov | -4/+4 | |
| 2019-08-17 | resolve: Properly integrate derives and `macro_rules` scopes | Vadim Petrochenkov | -0/+12 | |
| 2019-07-27 | tests: Move run-pass tests with naming conflicts to ui | Vadim Petrochenkov | -0/+103 | |
| 2019-07-27 | tests: Move run-pass tests without naming conflicts to ui | Vadim Petrochenkov | -0/+675 | |
| 2019-07-09 | Add a test case with `$crate` from other crate | Vadim Petrochenkov | -0/+6 | |
| 2019-06-24 | Address review comments. | Mazdak Farrokhzad | -0/+1 | |
| 2019-05-22 | tests: Centralize proc macros commonly used for testing | Vadim Petrochenkov | -240/+99 | |
| 2019-04-22 | Remove double trailing newlines | varkor | -1/+0 | |
| 2019-03-14 | Moved issue tests to subdirs and normalised names. | Alexander Regueiro | -0/+0 | |
| 2018-12-28 | Add test demonstrating disintegration of `$crate` into `$` and `crate` | Vadim Petrochenkov | -0/+7 | |
| 2018-12-25 | Remove licenses | Mark Rousskov | -320/+0 | |
| 2018-12-19 | Reintroduce special pretty-printing for `$crate` when it's necessary for ↵ | Vadim Petrochenkov | -1/+33 | |
| proc macros | ||||
| 2018-12-19 | proc_macro: Accept `$crate` as an identifier if it comes from the compiler | Vadim Petrochenkov | -0/+12 | |
| 2018-12-09 | Fix rebase + Add missing `// force-host` | Vadim Petrochenkov | -0/+1 | |
| 2018-12-09 | Move some tests from ui-fulldeps to ui | Vadim Petrochenkov | -0/+19 | |
| 2018-12-09 | Move former compile-fail-fulldeps tests to ui | Vadim Petrochenkov | -0/+596 | |
| 2018-11-30 | tests: use `force-host` and `no-prefer-dynamic` in all proc_macro tests. | Eduard-Mihai Burtescu | -1/+15 | |
| 2018-11-30 | tests: move all proc_macro tests from -fulldeps. | Eduard-Mihai Burtescu | -0/+627 | |
