about summary refs log tree commit diff
path: root/src/libsyntax/ext/base.rs
AgeCommit message (Collapse)AuthorLines
2018-12-30Improve error recovery for some built-in macrosVadim Petrochenkov-4/+5
2018-12-28Auto merge of #57155 - petrochenkov:dcrate3, r=dtolnaybors-0/+14
Resolve `$crate`s for pretty-printing at more appropriate time Doing it in `BuildReducedGraphVisitor` wasn't a good idea, identifiers wasn't actually visited half of the time. As a result some `$crate`s weren't resolved and were therefore pretty-printed as `$crate` literally, which turns into two tokens during re-parsing of the pretty-printed text. Now we are visiting and resolving `$crate` identifiers in an item right before sending that item to a proc macro attribute or derive. Fixes https://github.com/rust-lang/rust/issues/57089
2018-12-28Resolve `$crate`s for pretty-printing at more appropriate timeVadim Petrochenkov-0/+14
2018-12-27Fix `trace_macros` and `log_syntax`Vadim Petrochenkov-12/+18
2018-12-27Do not abort compilation if expansion produces errorsVadim Petrochenkov-5/+4
Fix a number of uncovered deficiencies in diagnostics
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-19Remove `eliminate_crate_var` and special pretty-printing for `$crate`Vadim Petrochenkov-2/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-3/+3
2018-12-07Unsupport `#[derive(Trait)]` sugar for `#[derive_Trait]` legacy plugin ↵Vadim Petrochenkov-7/+0
attributes
2018-11-18resolve: Check resolution consistency for import paths and multi-segment ↵Vadim Petrochenkov-0/+7
macro paths
2018-11-08Use `Lit` rather than `P<Lit>` in `ast::ExprKind`.Nicholas Nethercote-1/+1
Because it results in fewer allocations and small speedups on some benchmarks.
2018-10-23Point at macro definition when no rules expect tokenEsteban Küber-4/+14
2018-09-26Remove OneVectorljedrz-25/+25
2018-09-13resolve: Put different parent scopes into a single structureVadim Petrochenkov-2/+2
2018-09-11resolve: Support resolving identifier macros without their own IDVadim Petrochenkov-5/+4
Invocation/expansion ID (aka `Mark`) is not really necessary for resolving a macro path. What is really necessary is its parent module, parent expansion and parent legacy scope. This is required for validation resolutions of built-in attributes, which don't get their own `Mark`s
2018-09-10resolve: Remove `unshadowable_attrs`Vadim Petrochenkov-2/+0
2018-09-04Fix #[test] shadowing in macro_preludeJohn Renner-0/+3
2018-08-28Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.Eduard-Mihai Burtescu-3/+3
2018-08-23Use optimized SmallVec implementationIgor Gutorov-4/+4
2018-08-20resolve: Consolidate error reporting for resolved macros in `fn ↵Vadim Petrochenkov-8/+11
resolve_macro_to_def`
2018-08-19mv codemap() source_map()Donato Sciarra-1/+1
2018-08-19mv (mod) codemap source_mapDonato Sciarra-2/+2
2018-08-19mv CodeMap SourceMapDonato Sciarra-2/+2
2018-08-13Move SmallVec and ThinVec out of libsyntaxljedrz-28/+29
2018-08-06Support custom attributes when macro modularization is enabledVadim Petrochenkov-3/+9
2018-08-06Avoid modifying invocations in place for derive helper attributesVadim Petrochenkov-2/+2
2018-08-01resolve: Implement prelude search for macro pathsVadim Petrochenkov-0/+5
resolve/expansion: Implement tool attributes
2018-07-19Improve suggestion for missing fmt str in printlnEsteban Küber-10/+15
Avoid using `concat!(fmt, "\n")` to improve the diagnostics being emitted when the first `println!()` argument isn't a formatting string literal.
2018-07-15Auto merge of #52383 - petrochenkov:pmns, r=alexcrichtonbors-0/+3
resolve: Functions introducing procedural macros reserve a slot in the macro namespace as well Similarly to https://github.com/rust-lang/rust/pull/52234, this gives us symmetry between internal and external views of a crate, but in this case it's always an error to call a procedural macro in the same crate in which it's defined. Closes https://github.com/rust-lang/rust/issues/52225
2018-07-14Functions introducing procedural macros reserve a slot in the macro ↵Vadim Petrochenkov-0/+3
namespace as well
2018-07-14Remove most of `PartialEq` impls from AST and HIR structuresVadim Petrochenkov-1/+1
2018-07-11Rollup merge of #52224 - ljedrz:dyn_libsyntax, r=oli-obkMark Rousskov-25/+26
Deny bare trait objects in in src/libsyntax Enforce `#![deny(bare_trait_objects)]` in `src/libsyntax`.
2018-07-10Pacify tidyljedrz-1/+2
2018-07-10Deny bare trait objects in in src/libsyntaxljedrz-25/+25
2018-07-08hygiene: Decouple transparencies from expansion IDsVadim Petrochenkov-12/+6
2018-06-30hygiene: Implement transparent marksVadim Petrochenkov-0/+8
2018-06-30expansion: Give names to some fields of `SyntaxExtension`Vadim Petrochenkov-14/+16
2018-06-27Implement `#[macro_export(local_inner_macros)]`Vadim Petrochenkov-0/+3
2018-06-23hygiene: Merge `NameAndSpan` into `ExpnInfo`Vadim Petrochenkov-1/+1
2018-06-23hygiene: Do not reset expansion info for `quote!`Vadim Petrochenkov-1/+5
2018-06-23expansion: Rename `Expansion` to `AstFragment`Vadim Petrochenkov-3/+5
2018-05-30resolve: Make sure indeterminate and inconsistent macro resolutions always ↵Vadim Petrochenkov-0/+10
generate errors
2018-05-17Pass crate editions to macro expansions, update testsVadim Petrochenkov-7/+24
2018-04-29Warn on pointless `#[derive]` in more placesAustin Bonander-2/+19
This fixes the regression in #49934 and ensures that unused `#[derive]`s on statements, expressions and generic type parameters survive to trip the `unused_attributes` lint. For `#[derive]` on macro invocations it has a hardcoded warning since linting occurs after expansion. This also adds regression testing for some nodes that were already warning properly. closes #49934
2018-04-14Add error codes for libsyntax_extGuillaume Gomez-1/+4
2018-04-10Auto merge of #49390 - Zoxc:sync-syntax, r=michaelwoeristerbors-9/+11
More thread-safety changes r? @michaelwoerister
2018-04-06Use `Span::apply_mark` where possibleVadim Petrochenkov-1/+1
2018-04-06Get rid of `SpannedIdent`Vadim Petrochenkov-1/+1
2018-04-06Use `Span` instead of `SyntaxContext` in `Ident`Vadim Petrochenkov-2/+2
2018-04-03expand macro invocations in `extern {}` blocksAustin Bonander-0/+28