about summary refs log tree commit diff
path: root/src/libsyntax/ext
AgeCommit message (Collapse)AuthorLines
2015-11-13Auto merge of #29761 - eefriedman:rename-nopanic, r=sanxiynbors-21/+21
Just `sed s/_nopanic//g`. Hopefully makes libsyntax a bit more readable.
2015-11-12Auto merge of #29780 - KyleMayes:quote-ext, r=nrcbors-0/+63
This is my first code contribution to Rust, so I'm sure there are some issues with the changes I've made. I've added the `quote_arg!`, `quote_block!`, `quote_path!`, and `quote_meta_item!` quasiquoting macros. From my experience trying to build AST in compiler plugins, I would like to be able to build any AST piece with a quasiquoting macro (e.g., `quote_struct_field!` or `quote_variant!`) and then use those AST pieces in other quasiquoting macros, but this pull request just adds some of the low-hanging fruit. I'm not sure if these additions are desirable, and I'm sure these macros can be implemented in an external crate if not.
2015-11-12libsyntax: deny warnings in doctestsKevin Butler-7/+9
2015-11-11libsyntax: Add more quasiquoting macrosKyle Mayes-0/+63
2015-11-11Auto merge of #29744 - sanxiyn:modernize, r=nrcbors-10/+10
2015-11-10Rename _nopanic methods to remove the suffix.Eli Friedman-21/+21
Just `sed s/_nopanic//g`. Hopefully makes libsyntax a bit more readable.
2015-11-10Use lifetime elisionSeo Sanghyeon-2/+2
2015-11-10Use deref coercionsSeo Sanghyeon-8/+8
2015-11-09syntax: Use `let _` in #[derive(Debug)]Alex Crichton-4/+21
This should help avoid triggering the unused_results lint which can frequently be turned on. Closes #29710
2015-11-06Auto merge of #29582 - oli-obk:token_tree, r=sfacklerbors-121/+133
2015-11-06remove `Tt` prefix from TokenType variantsOliver Schneider-121/+133
[breaking change]
2015-11-06Auto merge of #29615 - steveklabnik:lol_strings, r=alexcrichtonbors-3/+1
&format!("...") is the same as "" if we're not doing any interpolation, and doesn't allocate an intermediate String.
2015-11-05Auto merge of #29565 - sfackler:issue-29540, r=huonwbors-24/+35
Closes #29540 r? @huonw
2015-11-05remove excess string allocationSteve Klabnik-3/+1
&format!("...") is the same as "" if we're not doing any interpolation, and doesn't allocate an intermediate String.
2015-11-03Don't chain method calls in #[derive(Debug)]Steven Fackler-24/+35
Closes #29540
2015-11-03Allow indirect operands to be used as inputs for inline asmAmanieu d'Antras-2/+2
2015-11-03Auto merge of #29285 - eefriedman:libsyntax-panic, r=nrcbors-31/+29
A set of commits which pushes some panics out of core parser methods, and into users of those parser methods.
2015-10-31Remove PatWildMultiVadim Petrochenkov-2/+2
2015-10-28Make quote plugin use parsing functions which explicitly panic.Eli Friedman-7/+7
Rename parse_* to parse_*_panic, and add parse_attribute_panic.
2015-10-27Don't panic for fatal errors in attribute parsing.Eli Friedman-2/+2
2015-10-27Delete unnecessary ParserAttr trait.Eli Friedman-2/+0
2015-10-27Don't use panicking helpers in Parser.Eli Friedman-20/+20
2015-10-25syntax/rustc_front: Simplify VariantData::fieldsVadim Petrochenkov-6/+6
And use VariantData instead of P<VariantData> in Item_ and Variant_
2015-10-20Auto merge of #29148 - petrochenkov:noshow, r=alexcrichtonbors-5/+3
Closes https://github.com/rust-lang/rust/issues/29145 [breaking-change], needs a crater run.
2015-10-19Generate stability attributes for derived implsVadim Petrochenkov-1/+1
The attributes are copied from the item for which the trait impl is derived
2015-10-18Remove #[derive(Show)]Vadim Petrochenkov-5/+3
2015-10-16Auto merge of #29014 - petrochenkov:stability, r=brsonbors-1/+1
Stricter checking of stability attributes + enforcement of their invariants at compile time (+ removed dead file librustc_front/attr.rs) I intended to enforce use of `reason` for unstable items as well (it normally presents for new items), but it turned out too intrusive, many older unstable items don't have `reason`s. r? @aturon I'm studying how stability works and do some refactoring along the way, so it's probably not the last PR.
2015-10-15Auto merge of #28980 - nrc:unsafe-macros, r=@pnkfelixbors-100/+0
This is a [breaking change]. @brson could you do a Crater run with this PR please? Lets not land till Crater says its OK. This was discussed at https://internals.rust-lang.org/t/does-anyone-use-the-push-pop-unsafe-macros/2702
2015-10-13Merge VariantData and VariantData_Vadim Petrochenkov-5/+4
2015-10-13Merge struct fields and struct kindVadim Petrochenkov-10/+13
2015-10-13Dict -> Struct, StructDef -> VariantData, def -> dataVadim Petrochenkov-18/+18
2015-10-13Remove now redundant NodeId from VariantVadim Petrochenkov-1/+0
2015-10-13Decouple structure kinds from NodeIdsVadim Petrochenkov-3/+7
2015-10-13Unify structures and enum variants in ASTVadim Petrochenkov-84/+37
2015-10-13Refactor attr::StabilityVadim Petrochenkov-1/+1
Stricter checking + enforcement of invariants at compile time
2015-10-12Remove the push_unsafe! and pop_unsafe! macros.Nick Cameron-100/+0
This is a [breaking change].
2015-10-09Auto merge of #28857 - nrc:lowering, r=nikomatsakisbors-400/+75
r? @nikomatsakis
2015-10-09Some cleanup of no longer used AST thingsNick Cameron-6/+3
2015-10-09hygiene for `for` loops, `if let`, `while let`Nick Cameron-15/+72
and some unrelated test cleanups
2015-10-09Fix stabilityNick Cameron-1/+1
2015-10-09Move placement in desugaring to loweringNick Cameron-154/+3
2015-10-09if let and while letNick Cameron-140/+4
2015-10-09Move `for` loop desugaring to loweringNick Cameron-94/+2
2015-10-08typos: fix a grabbag of typos all over the placeCristi Cobzarenco-3/+3
2015-10-06Add comment for the use of Ident in hash map in mtwtVadim Petrochenkov-0/+2
2015-10-03libsyntax: Do not derive Hash for IdentVadim Petrochenkov-2/+2
2015-10-01Stop re-exporting AttrStyle's variants and rename them.Ms2ger-3/+3
2015-09-26Auto merge of #28642 - petrochenkov:name3, r=nrcbors-88/+76
This PR removes random remaining `Ident`s outside of libsyntax and performs general cleanup In particular, interfaces of `Name` and `Ident` are tidied up, `Name`s and `Ident`s being small `Copy` aggregates are always passed to functions by value, and `Ident`s are never used as keys in maps, because `Ident` comparisons are tricky. Although this PR closes https://github.com/rust-lang/rust/issues/6993 there's still work related to it: - `Name` can be made `NonZero` to compress numerous `Option<Name>`s and `Option<Ident>`s but it requires const unsafe functions. - Implementation of `PartialEq` on `Ident` should be eliminated and replaced with explicit hygienic, non-hygienic or member-wise comparisons. - Finally, large parts of AST can potentially be converted to `Name`s in the same way as HIR to clearly separate identifiers used in hygienic and non-hygienic contexts. r? @nrc
2015-09-24Cleanup interfaces of Name, SyntaxContext and IdentVadim Petrochenkov-88/+76
Make sure Name, SyntaxContext and Ident are passed by value Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
2015-09-24Remove the deprecated box(PLACE) syntax.Eduard Burtescu-2/+2