about summary refs log tree commit diff
path: root/src/libsyntax/ext/base.rs
AgeCommit message (Collapse)AuthorLines
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
2018-04-02Expand attribute macros on statements and expressions.Austin Bonander-0/+8
Retains the `stmt_expr_attributes` feature requirement for attributes on expressions. closes #41475 cc #38356
2018-03-28Make SyntaxExtension thread-safeJohn Kåre Alsaker-9/+11
2018-03-18Initial implementation of RFC 2151, Raw IdentifiersLymia Aluysia-2/+3
2018-03-07check stability of macro invocationsAustin Bonander-0/+4
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-6/+7
2018-02-07libsyntax/ext: trailing commas in builtin macrosMichael Lamparski-2/+4
Most notably this changes 'syntax::ext::base::get_single_str_from_tts' to accept a trailing comma, and revises the documentation so that this aspect is not surprising. I made this change under the understanding that this crate is private rustc implementation detail (I hope this is correct!). After reviewing all call sites, I believe the revised semantics are closer to the intended spirit of the function.
2018-01-26Do not capture stderr in the compiler. Instead just panic silently for fatal ↵John Kåre Alsaker-1/+1
errors
2018-01-15Point at unused arguments for format stringEsteban Küber-19/+19
Avoid overlapping spans by only pointing at the arguments that are not being used in the argument string. Enable libsyntax to have diagnostics with multiple primary spans by accepting `Into<MultiSpan>` instead of `Span`.
2018-01-01Fix docs for future pulldown migrationMalo Jaffré-1/+2
2017-12-26Do not expand a derive invocation when derive is not allowedSeiichi Uchida-0/+12
1. Change the return type of `expand_invoc()` and its subroutines to `Option<Expansion>` from `Expansion`. 2. Return `None` when expanding a derive invocation if the item cannot have derive on it (in `expand_derive_invoc()`).
2017-12-19Implement non-mod.rs mod statementsTaylor Cramer-1/+1