about summary refs log tree commit diff
path: root/src/libsyntax_ext/deriving/debug.rs
AgeCommit message (Collapse)AuthorLines
2019-12-30Rename directories for some crates from `syntax_x` to `rustc_x`Vadim Petrochenkov-137/+0
`syntax_expand` -> `rustc_expand` `syntax_pos` -> `rustc_span` `syntax_ext` -> `rustc_builtin_macros`
2019-12-22Format the worldMark Rousskov-44/+46
2019-12-21Rollup merge of #67355 - Centril:merge-mut, r=oli-obkMazdak Farrokhzad-1/+1
Merge `ast::Mutability` and `mir::Mutability` r? @oli-obk
2019-12-20introduce 'type AttrVec'Mazdak Farrokhzad-3/+1
2019-12-201. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.Mazdak Farrokhzad-1/+1
2. mir::Mutability -> ast::Mutability.
2019-10-16move syntax::ext to new crate syntax_expandMazdak Farrokhzad-1/+1
2019-09-26Rename `Stmt.node` to `Stmt.kind`varkor-1/+1
2019-09-15Give more `Idents` spansMatthew Jasper-4/+4
2019-08-23Audit uses of `apply_mark` in built-in macrosVadim Petrochenkov-1/+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-17Remove gensyms from built-in derivesMatthew Jasper-4/+4
Also make them generally more hygienic with name resolution.
2019-08-15`Ident::with_empty_ctxt` -> `Ident::with_dummy_span`Vadim Petrochenkov-2/+2
`Ident` has had a full span rather than just a `SyntaxContext` for a long time now.
2019-08-14Merge Variant and Variant_Caio-1/+1
2019-07-31Replace AstBuilder with inherent methodsMark Rousskov-1/+0
2019-06-03syntax: revert `ast::AsyncArgument` and associated changes.Eduard-Mihai Burtescu-1/+0
Here follows the main reverts applied in order to make this commit: Revert "Rollup merge of #60676 - davidtwco:issue-60674, r=cramertj" This reverts commit 45b09453dbf120cc23d889435aac3ed7d2ec8eb7, reversing changes made to f6df1f6c30b469cb9e65c5453a0efa03cbb6005e. Revert "Rollup merge of #60437 - davidtwco:issue-60236, r=nikomatsakis" This reverts commit 16939a50ea440e72cb6ecefdaabb988addb1ec0e, reversing changes made to 12bf98155249783583a91863c5dccf9e346f1226. Revert "Rollup merge of #59823 - davidtwco:issue-54716, r=cramertj" This reverts commit 62d1574876f5531bce1b267e62dff520d7adcbbb, reversing changes made to 4eff8526a789e0dfa8b97f7dec91b7b5c18e8544.
2019-05-27Avoid unnecessary internings.Nicholas Nethercote-2/+3
Most involving `Symbol::intern` on string literals.
2019-04-21Introduce `LocalSource` into the AST.David Wood-0/+1
This will be used to keep track of the origin of a local in the AST. In particular, it will be used by `async fn` lowering for the locals in `let <pat>: <ty> = __arg0;` statements.
2019-03-24Remove methods is_struct/is_tuple/is_unit from VariantDataVadim Petrochenkov-50/+46
2019-02-04libsyntax_ext => 2018Taiki Endo-6/+6
2018-12-25Remove licensesMark Rousskov-10/+0
2018-08-13Move SmallVec and ThinVec out of libsyntaxljedrz-1/+3
2018-07-12Deny bare trait objects in src/libsyntax_extljedrz-1/+1
2018-04-19Gensym remaining identifiersJames Sanderson-1/+1
2018-04-19Don't prepend deriving-generated attributes with _James Sanderson-1/+1
2018-04-15Provide better names for builtin deriving-generated attributesJames Sanderson-1/+1
2018-04-06Rename `ast::Variant_::name` into `ident` + Fix rebaseVadim Petrochenkov-1/+1
2018-03-11Fix hygene issue when deriving DebugPhlosioneer-1/+1
The code for several of the core traits doesn't use hygenic macros. This isn't a problem, except for the Debug trait, which is the only one that uses a variable, named "builder". Variables can't share names with unit structs, so attempting to [derive(Debug)] on any type while a unit struct with the name "builder" was in scope would result in an error. This commit just changes the name of the variable to "__debug_trait_builder", because I couldn't figure out how to get a list of all unit structs in-scope from within the derive expansion function. If someone wants to have a unit struct with the exact name "__debug_trait_builder", they'll just have to do it without a [derive(Debug)].
2017-12-09Use hygiene to access the injected crate (`core` or `std`) from builtin macros.Jeffrey Seyfried-3/+4
2017-08-30Make fields of `Span` privateVadim Petrochenkov-1/+1
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-1/+1
Like #43008 (f668999), but _much more aggressive_.
2017-06-16deriv(Hash) for single-variant enum should not hash discriminantStepan Koltsov-1/+1
Fixes #39137
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-2/+2
2016-11-21Use `Symbol` instead of `InternedString` in the AST, HIR, and various other ↵Jeffrey Seyfried-3/+2
places.
2016-11-20Move `syntax::util::interner` -> `syntax::symbol`, cleanup.Jeffrey Seyfried-8/+7
2016-09-04Replace `_, _` with `..`Vadim Petrochenkov-1/+1
2016-08-30Future proof `libsyntax_ext` for `union`.Jeffrey Seyfried-0/+1
2016-07-19Run rustfmt on libsyntax_ext/deriving folderSrinivas Reddy Thatiparthy-50/+39
2016-06-26Rollup merge of #34436 - jseyfried:no_block_expr, r=eddybJeffrey Seyfried-2/+3
To allow these braced macro invocation, this PR removes the optional expression from `ast::Block` and instead uses a `StmtKind::Expr` at the end of the statement list. Currently, braced macro invocations in blocks can expand into statements (and items) except when they are last in a block, in which case they can only expand into expressions. For example, ```rust macro_rules! make_stmt { () => { let x = 0; } } fn f() { make_stmt! {} //< This is OK... let x = 0; //< ... unless this line is commented out. } ``` Fixes #34418.
2016-06-26Rollup merge of #34339 - jseyfried:thin_vec, r=petrochenkov,ManishearthJeffrey Seyfried-1/+1
Generalize and abstract `ThinAttributes` to `ThinVec<Attribute>`.
2016-06-26Rollup merge of #34316 - jseyfried:refactor_ast_stmt, r=eddybJeffrey Seyfried-3/+5
Refactor away `ast::Decl`, refactor `ast::Stmt`, and rename `ast::ExprKind::Again` to `ast::ExprKind::Continue`.
2016-06-23Remove field `expr` of `ast::Block`Jeffrey Seyfried-2/+3
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-1/+2
2016-06-19Generalize and abstract `ThinAttributes`Jeffrey Seyfried-1/+1
2016-06-17Fix falloutJeffrey Seyfried-3/+6
2016-05-12Improve derived implementations for enums with lots of fieldless variantsBjörn Steinbrink-0/+1
A number of trait methods like PartialEq::eq or Hash::hash don't actually need a distinct arm for each variant, because the code within the arm only depends on the number and types of the fields in the variants. We can easily exploit this fact to create less and better code for enums with multiple variants that have no fields at all, the extreme case being C-like enums. For nickel.rs and its by now infamous 800 variant enum, this reduces optimized compile times by 25% and non-optimized compile times by 40%. Also peak memory usage is down by almost 40% (310MB down to 190MB). To be fair, most other crates don't benefit nearly as much, because they don't have as huge enums. The crates in the Rust distribution that I measured saw basically no change in compile times (I only tried optimized builds) and only 1-2% reduction in peak memory usage.
2016-02-23Some refactoring in deriving/debug.rsVadim Petrochenkov-8/+3
2016-02-22Fix #[derive] for empty structs with bracesVadim Petrochenkov-3/+8
2016-02-11Remove some unnecessary indirection from AST structuresVadim Petrochenkov-2/+2
2016-02-11[breaking-change] don't glob export ast::StrStyle variantsOliver 'ker' Schneider-3/+2
2016-02-11[breaking-change] don't glob export ast::Mutablity variantsOliver 'ker' Schneider-1/+1
2016-02-11[breaking-change] don't pub export ast::Stmt_ variantsOliver Schneider-1/+1