about summary refs log tree commit diff
path: root/src/libsyntax/ext/base.rs
AgeCommit message (Collapse)AuthorLines
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
2017-12-17syntax: Rename `P::unwrap` into `P::into_inner`Vadim Petrochenkov-2/+2
2017-12-09Use hygiene to access the injected crate (`core` or `std`) from builtin macros.Jeffrey Seyfried-9/+6
2017-11-21allow loading external files in documentationQuietMisdreavus-0/+2
Partial implementation of https://github.com/rust-lang/rfcs/pull/1990 (needs error reporting work) cc #44732
2017-09-21suggest an outer attribute when `#![derive(...)]` (predictably) failsZack M. Davis-0/+4
2017-09-17Rollup merge of #44088 - bjorn3:better_trace_macros, r=jseyfriedTim Neumann-1/+3
Fix "new trace_macros doesn't work if there's an error during expansion" Fixes #43493
2017-09-02Better trace-macro and less span_err_fatalbjorn3-1/+3
2017-08-30Make fields of `Span` privateVadim Petrochenkov-2/+2
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-3/+3
Like #43008 (f668999), but _much more aggressive_.
2017-08-12syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros.Eduard-Mihai Burtescu-5/+11
2017-08-07Reexport all SyntaxExtension variantsOliver Schneider-1/+1
2017-07-27Avoid duplicated errors for generic arguments in macro pathsVadim Petrochenkov-1/+1
2017-06-26Add `LazyTokenStream`.Jeffrey Seyfried-1/+1
2017-06-26Implement `quote!` and other `proc_macro` API.Jeffrey Seyfried-1/+4
2017-06-26Simplify `hygiene::Mark` application, andJeffrey Seyfried-14/+0
remove variant `Token::SubstNt` in favor of `quoted::TokenTree::MetaVar`.
2017-05-31Extend the unused macro lint to macros 2.0est31-1/+3
2017-05-25Hygienize `librustc_resolve`.Jeffrey Seyfried-0/+11
2017-05-19Rollup merge of #42006 - jseyfried:fix_include_regression, r=nrcMark Simulacrum-2/+2
Fix ICE on `include!(line!())` (regression) Fixes #41776. r? @nrc
2017-05-17Auto merge of #42049 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-6/+6
Rollup of 5 pull requests - Successful merges: #41937, #41957, #42017, #42039, #42046 - Failed merges:
2017-05-15adressed comments by @kennytm and @petrochenkovAndre Bogus-2/+2
2017-05-15Fix regression on `include!(line!())`.Jeffrey Seyfried-2/+2
2017-05-13Support #[allow] etc logic on a per macro levelest31-1/+1
This commit extends the current unused macro linter to support directives like #[allow(unused_macros)] or #[deny(unused_macros)] directly next to the macro definition, or in one of the modules the macro is inside. Before, we only supported such directives at a per crate level, due to the crate's NodeId being passed to session.add_lint. We also had to implement handling of the macro's NodeId in the lint visitor.
2017-05-13Add lint for unused macrosest31-0/+6
2017-05-12Fix some clippy warnings in libsyntaxAndre Bogus-5/+5
This is mostly removing stray ampersands, needless returns and lifetimes.
2017-05-06Group "macro expansion" notes per call spanEsteban Küber-2/+11
2017-05-05Use diagnostics for trace_macro instead of printlnEsteban Küber-0/+3
2017-03-30Improve `Path` spans.Jeffrey Seyfried-1/+20
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-45/+29
2017-03-10Move `resolve_invoc` from `syntax` to `resolve`.Jeffrey Seyfried-3/+9
2017-03-10Refactor out `ast::ItemKind::MacroDef`.Jeffrey Seyfried-4/+2
2017-03-03Integrate `TokenStream`.Jeffrey Seyfried-14/+6
2017-03-02Auto merge of #39655 - durka:recursion-limit-suggestion, r=nikomatsakisbors-4/+10
suggest doubling recursion limit in more situations Fixes #38852. r? @bluss
2017-03-02note -> helpAlex Burka-1/+1
2017-02-23Move MacroKind into Def::MacroJosh Driver-1/+1
2017-02-16Refactor macro resolution errors + add derive macro suggestionsJosh Driver-10/+34
2017-02-12Allow using inert attributes from `proc_macro_derive`s with ↵Jeffrey Seyfried-9/+6
`#![feature(proc_macro)]`.
2017-02-09suggest doubling recursion limit in more situationsAlex Burka-4/+10
2017-02-05Move derive macro expansion into the MacroExpanderJosh Driver-0/+10
This removes the expand_derives function, and sprinkles the functionality throughout the Invocation Collector, Expander and Resolver.
2017-02-05Rename CustomDerive to ProcMacroDerive for macros 1.1Josh Driver-1/+5
2017-02-05Make builtin derives a SyntaxExtensionJosh Driver-1/+7
This allows builtin derives to be registered and resolved, just like other derive types.
2017-01-17Refactor the parser to consume token trees.Jeffrey Seyfried-3/+1
2016-12-23Allow legacy custom derive authors to disable warnings in downstream crates.Jeffrey Seyfried-0/+2
2016-12-18Avoid including attributes in bang macro invocations.Jeffrey Seyfried-4/+2