about summary refs log tree commit diff
path: root/src/libsyntax_ext/global_allocator.rs
AgeCommit message (Collapse)AuthorLines
2019-08-27Cleanup: Consistently use `Param` instead of `Arg` #62426Kevin Per-6/+6
2019-08-23Audit uses of `apply_mark` in built-in macrosVadim Petrochenkov-2/+1
Replace them with equivalents of `Span::{def_site,call_site}` from proc macro API. The new API is much less error prone and doesn't rely on macros having default transparency.
2019-08-15`Ident::with_empty_ctxt` -> `Ident::with_dummy_span`Vadim Petrochenkov-4/+4
`Ident` has had a full span rather than just a `SyntaxContext` for a long time now.
2019-08-15syntax_pos: `NO_EXPANSION`/`SyntaxContext::empty()` -> `SyntaxContext::root()`Vadim Petrochenkov-1/+1
For consistency with `ExpnId::root`. Also introduce a helper `Span::with_root_ctxt` for creating spans with `SyntaxContext::root()` context
2019-07-31Replace AstBuilder with inherent methodsMark Rousskov-1/+0
2019-07-31Remove Span argument from ExtCtxt::attributeMark Rousskov-1/+1
MetaItem.span was always equivalent
2019-07-24Fix rebaseVadim Petrochenkov-1/+1
2019-07-24syntax_ext: Improve and simplify code generated by `#[global_allocator]`Vadim Petrochenkov-57/+28
Instead of ``` mod allocator_abi { /* methods */ } ``` we now generate ``` const _: () = { /* methods */ } ``` and use `std_path` for paths referring to standard library entities. This way we no longer need to generate `use` and `extern crate` imports, and `#[global_allocator]` starts working inside unnamed blocks.
2019-07-24syntax_ext: Reuse built-in attribute template checking for macro attributesVadim Petrochenkov-14/+5
2019-07-24syntax_ext: Turn `#[global_allocator]` into a regular attribute macroVadim Petrochenkov-145/+78
2019-07-24Merge `rustc_allocator` into `libsyntax_ext`Vadim Petrochenkov-0/+296