summary refs log tree commit diff
path: root/src/libsyntax_ext/deriving/mod.rs
AgeCommit message (Collapse)AuthorLines
2019-07-31Replace AstBuilder with inherent methodsMark Rousskov-1/+0
2019-07-27Move proc macro server into libsyntaxVadim Petrochenkov-1/+0
2019-07-26Introduce built-in macros through libcoreVadim Petrochenkov-83/+3
2019-07-07syntax: Pre-intern names of all built-in macrosVadim Petrochenkov-17/+17
They always end up interned anyway
2019-07-07syntax: Migrate built-in macros to the regular stability checkingVadim Petrochenkov-15/+19
2019-06-23Remove built-in derive macros `Send` and `Sync`Vadim Petrochenkov-2/+0
2019-06-23Fix meta-variable binding errors in macrosJulien Cretin-1/+1
The errors are either: - The meta-variable used in the right-hand side is not bound (or defined) in the left-hand side. - The meta-variable used in the right-hand side does not repeat with the same kleene operator as its binder in the left-hand side. Either it does not repeat enough, or it uses a different operator somewhere. This change should have no semantic impact.
2019-06-18allow_internal_unstable: Avoid some more allocationsVadim Petrochenkov-16/+3
2019-06-18syntax: Factor out common fields from `SyntaxExtension` variantsVadim Petrochenkov-3/+18
2019-06-10syntax: Rename variants of `SyntaxExtension` for consistencyVadim Petrochenkov-1/+1
2019-06-10syntax: Use `MultiItemModifier` for built-in derivesVadim Petrochenkov-4/+20
2019-05-27Pass symbols to `ExtCtxt::std_path` instead of strings.Nicholas Nethercote-1/+1
Because this function is hot. Also remove the dead `ty_option` function.
2019-05-27Avoid unnecessary internings.Nicholas Nethercote-1/+1
Most involving `Symbol::intern` on string literals.
2019-05-13Remove the equality operation between `Symbol` and strings.Nicholas Nethercote-2/+2
And also the equality between `Path` and strings, because `Path` is made up of `Symbol`s.
2019-02-11Use `Rc<[Symbol]>` instead of `Vec<Symbol>` to reduce # of allocsOliver Scherer-3/+4
2019-02-11Require a list of features to allow in `allow_internal_unstable`Oliver Scherer-2/+6
2019-02-04libsyntax_ext => 2018Taiki Endo-2/+2
2018-12-27Get rid of `Block::recovered`Vadim Petrochenkov-1/+0
2018-12-25Remove licensesMark Rousskov-10/+0
2018-08-16syntax_ext: remove leftover span_err_if_not_stage0 macro.Eduard-Mihai Burtescu-11/+0
2018-07-12Deny bare trait objects in src/libsyntax_extljedrz-1/+1
2018-06-23hygiene: Merge `NameAndSpan` into `ExpnInfo`Vadim Petrochenkov-2/+2
2018-06-20Rename structures in astvarkor-1/+1
2018-06-20Refactor ast::GenericParam as a structvarkor-3/+6
2018-06-20Rename ast::GenericParam and ast::GenericArgvarkor-1/+1
It's so confusing to have everything having the same name, at least while refactoring.
2018-05-26Add `Ident::as_str` helperVadim Petrochenkov-1/+1
2018-05-21Add E0665Guillaume Gomez-0/+11
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-2/+2
2017-12-22Auto merge of #46732 - estebank:silence-recovered-blocks, r=petrochenkovbors-0/+1
Do not emit type errors on recovered blocks When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user. Fix #44579.
2017-12-21Do not emit type errors on recovered blocksEsteban Küber-0/+1
When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user.
2017-12-21Add GenericParam, refactor Generics in ast, hir, rustdocJonas Platte-4/+6
The Generics now contain one Vec of an enum for the generic parameters, rather than two separate Vec's for lifetime and type parameters. Additionally, places that previously used Vec<LifetimeDef> now use Vec<GenericParam> instead.
2017-12-09Use hygiene to access the injected crate (`core` or `std`) from builtin macros.Jeffrey Seyfried-23/+7
2017-08-30Make fields of `Span` privateVadim Petrochenkov-2/+2
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-1/+1
Like #43008 (f668999), but _much more aggressive_.
2017-05-25Hygienize `librustc_resolve`.Jeffrey Seyfried-1/+1
2017-05-12Remove some unused macros from the rust codebaseest31-6/+0
Removes unused macros from: * libcore * libcollections The last use of these two macros was removed in commit b64c9d56700e2c41207166fe8709711ff02488ff when the char_range_at_reverse function was been removed. * librustc_errors Their last use was removed by commits 2f2c3e178325dc1837badcd7573c2c0905fab979 and 11dc974a38fd533aa692cea213305056cd3a6902. * libsyntax_ext * librustc_trans Also, put the otry macro in back/msvc/mod.rs under the same cfg argument as the places that use it.
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-24/+10
2017-03-10Refactor out `ast::ItemKind::MacroDef`.Jeffrey Seyfried-1/+1
2017-02-05Move derive macro expansion into the MacroExpanderJosh Driver-238/+1
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-2/+2
2017-02-05Make builtin derives a SyntaxExtensionJosh Driver-21/+21
This allows builtin derives to be registered and resolved, just like other derive types.
2017-01-10Give custom derive spans an expansion IDNick Cameron-7/+20
2017-01-02rustc: Stabilize the `proc_macro` featureAlex Crichton-7/+1
This commit stabilizes the `proc_macro` and `proc_macro_lib` features in the compiler to stabilize the "Macros 1.1" feature of the language. Many more details can be found on the tracking issue, #35900. Closes #35900
2016-12-23Allow legacy custom derive authors to disable warnings in downstream crates.Jeffrey Seyfried-1/+3
2016-11-20Move `syntax::util::interner` -> `syntax::symbol`, cleanup.Jeffrey Seyfried-11/+11
2016-11-20Refactor `P<ast::MetaItem>` -> `ast::MetaItem`.Jeffrey Seyfried-1/+1
2016-11-20Refactor `MetaItemKind` to use `Name`s instead of `InternedString`s.Jeffrey Seyfried-30/+26
2016-11-20Refactor away `ast::Attribute_`.Jeffrey Seyfried-1/+1
2016-11-10Support `#[macro_reexport]`ing custom derives.Jeffrey Seyfried-2/+8
2016-10-31Changed most vec! invocations to use square bracesiirelu-2/+2
Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.