about summary refs log tree commit diff
path: root/src/libsyntax_ext/deriving/cmp
AgeCommit message (Collapse)AuthorLines
2019-09-05or-patterns: syntax: adjust derive, format, and building.Mazdak Farrokhzad-6/+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-36/+38
Also make them generally more hygienic with name resolution.
2019-08-15hygiene: `ExpnInfo` -> `ExpnData`Vadim Petrochenkov-2/+2
For naming consistency with everything else in this area
2019-08-15hygiene: Merge `ExpnInfo` and `InternalExpnData`Vadim Petrochenkov-2/+2
2019-08-14Merge Variant and Variant_Caio-1/+1
2019-08-03Move special treatment of `derive(Copy, PartialEq, Eq)` from expansion ↵Vadim Petrochenkov-2/+6
infrastructure to elsewhere
2019-07-31Replace AstBuilder with inherent methodsMark Rousskov-4/+0
2019-07-31Remove Span argument from ExtCtxt::attributeMark Rousskov-5/+5
MetaItem.span was always equivalent
2019-06-08use pattern matching for slices destructuringCedric-8/+8
2019-05-27Pass symbols to `ExtCtxt::std_path` instead of strings.Nicholas Nethercote-17/+18
Because this function is hot. Also remove the dead `ty_option` function.
2019-05-27Avoid unnecessary internings.Nicholas Nethercote-11/+11
Most involving `Symbol::intern` on string literals.
2019-02-04libsyntax_ext => 2018Taiki Endo-33/+38
2018-12-25Remove licensesMark Rousskov-40/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-10-26Remove redundant cloneShotaro Yamada-1/+1
2018-07-12Deny bare trait objects in src/libsyntax_extljedrz-4/+4
2018-06-20Rename structures in astvarkor-2/+2
2018-06-20Rename ast::GenericParam and ast::GenericArgvarkor-2/+2
It's so confusing to have everything having the same name, at least while refactoring.
2018-06-20Rename "parameter" to "arg"varkor-2/+2
2018-06-20Rename *Parameter to *Paramvarkor-2/+2
2018-06-20Consolidate PathParameters and AngleBracketedParameterDatavarkor-2/+2
2018-04-25Update comments to UFCS stylevarkor-11/+24
2018-04-25Use UFCSvarkor-11/+20
2018-04-25Fix handling of Nonevarkor-11/+11
2018-04-25Ensure derive(PartialOrd) is no longer accidentally exponentialvarkor-70/+83
Previously, two comparison operations would be generated for each field, each of which could delegate to another derived PartialOrd. Now we use ordering and optional chaining to ensure each pair of fields is only compared once.
2018-04-25Auto merge of #49986 - zofrex:better-derived-argument-names, r=Manishearthbors-12/+12
Provide better names for builtin deriving-generated attributes First attempt at fixing #49967 Not in love with any choices here, don't be shy if you aren't happy with anything :) I've tested that this produces nicer names in documentation, and that it no longer has issues conflicting with constants with the same name. (I guess we _could_ make a test for that... unsure if that would be valuable) In all cases I took the names from the methods as declared in the relevant trait. In some cases I had to prepend the names with _ otherwise there were errors about un-used variables. I'm uneasy with the inconsistency... do they all need to be like that? Is there a way to generate an alternate impl or use a different name (`_`?) in the cases where the arguments are not used? Lastly the gensym addition to Ident I implemented largely as suggested, but I want to point out it's a little circuitous (at least, as far as I understand it). `cx.ident_of(name)` is just `Ident::from_str`, so we create an Ident then another Ident from it. `Ident::with_empty_ctxt(Symbol::gensym(string))` may or may not be equivalent, I don't know if it's important to intern it _then_ gensym it. It seems like either we could use that, or if we do want a new method to make this convenient, it could be on Ident instead (`from_str_gensymed`?)
2018-04-19Fix some of the __names in the commentsJames Sanderson-6/+6
2018-04-19Gensym remaining identifiersJames Sanderson-2/+2
2018-04-19Don't prepend deriving-generated attributes with _James Sanderson-1/+1
2018-04-15Provide better names for builtin deriving-generated attributesJames Sanderson-4/+4
2018-04-12Abstract cs_eq for partial_eqvarkor-50/+27
2018-04-12Update partial_ord codegen summaryvarkor-3/+10
2018-04-11Remove redundant operation in derive[PartialEq]varkor-28/+58
2018-04-11Optimise the last field operations in derive[PartialOrd]varkor-51/+72
2018-04-11Fix derive(PartialOrd) implementationvarkor-6/+10
2017-12-09Use hygiene to access the injected crate (`core` or `std`) from builtin macros.Jeffrey Seyfried-8/+12
2017-08-30Make fields of `Span` privateVadim Petrochenkov-1/+1
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-7/+7
Like #43008 (f668999), but _much more aggressive_.
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-1/+1
2016-11-20Move `syntax::util::interner` -> `syntax::symbol`, cleanup.Jeffrey Seyfried-11/+11
2016-11-20Refactor `MetaItemKind` to use `Name`s instead of `InternedString`s.Jeffrey Seyfried-11/+11
2016-10-31Changed most vec! invocations to use square bracesiirelu-4/+4
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.
2016-09-10Improve `Eq` derivingVadim Petrochenkov-19/+36
2016-08-30Future proof `libsyntax_ext` for `union`.Jeffrey Seyfried-0/+4
2016-08-28Rollup merge of #35850 - SergioBenitez:master, r=nrcJeffrey Seyfried-1/+1
Implement RFC#1559: allow all literals in attributes Implemented rust-lang/rfcs#1559, tracked by #34981.
2016-08-25Implement RFC#1559: allow all literals in attributes.Sergio Benitez-1/+1
2016-08-18Split `AstBuilder::pat_enum` into `pat_tuple_struct` and `pat_path`Vadim Petrochenkov-2/+2
2016-07-19Run rustfmt on libsyntax_ext/deriving folderSrinivas Reddy Thatiparthy-264/+255
2016-06-26Rollup merge of #34436 - jseyfried:no_block_expr, r=eddybJeffrey Seyfried-1/+1
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.