about summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
AgeCommit message (Collapse)AuthorLines
2016-01-02Grammar fixesJames Mantooth-5/+5
2015-12-22Stop re-exporting PathParameters's variants.Ms2ger-15/+15
2015-12-21Auto merge of #30460 - Ms2ger:BindingMode, r=alexcrichtonbors-4/+3
2015-12-20Stop re-exporting the ast::BindingMode variants.Ms2ger-4/+3
2015-12-19Auto merge of #30184 - petrochenkov:ascr, r=nikomatsakisbors-0/+1
This PR is a rebase of the original PR by @eddyb https://github.com/rust-lang/rust/pull/21836 with some unrebasable parts manually reapplied, feature gate added + type equality restriction added as described below. This implementation is partial because the type equality restriction is applied to all type ascription expressions and not only those in lvalue contexts. Thus, all difficulties with detection of these contexts and translation of coercions having effect in runtime are avoided. So, you can't write things with coercions like `let slice = &[1, 2, 3]: &[u8];`. It obviously makes type ascription less useful than it should be, but it's still much more useful than not having type ascription at all. In particular, things like `let v = something.iter().collect(): Vec<_>;` and `let u = t.into(): U;` work as expected and I'm pretty happy with these improvements alone. Part of https://github.com/rust-lang/rust/issues/23416
2015-12-18Deprecate name `OwnedSlice` and don't use itVadim Petrochenkov-9/+8
2015-12-17Remove unused importsJeffrey Seyfried-1/+1
2015-12-16Implement type ascription.Eduard Burtescu-0/+1
2015-12-14[breaking-change] move ast_util functions to methodsfaineance-5/+161
2015-12-05Use a struct instead of a tuple for inline asm output operandsAmanieu d'Antras-1/+9
2015-12-05Add proper support for indirect output constraints in inline asmAmanieu d'Antras-1/+1
2015-11-26Moved and refactored ThinAttributesMarvin Löbel-92/+1
2015-11-26Add syntax support for attributes on expressions and all syntaxMarvin Löbel-1/+141
nodes in statement position. Extended #[cfg] folder to allow removal of statements, and of expressions in optional positions like expression lists and trailing block expressions. Extended lint checker to recognize lint levels on expressions and locals.
2015-11-23Avoid some code duplication around getting names of numeric types.Michael Woerister-2/+2
2015-11-17Auto merge of #29887 - sanxiyn:match-ref-pats, r=sfacklerbors-3/+3
2015-11-17Fix match_ref_pats flagged by ClippySeo Sanghyeon-3/+3
2015-11-16rename `ast::ImplItem_::*ImplItem` to `ast::ImplItemKind::*`Oliver Schneider-7/+6
2015-11-12libsyntax: deny warnings in doctestsKevin Butler-6/+8
2015-11-06remove `Tt` prefix from TokenType variantsOliver Schneider-34/+33
[breaking change]
2015-11-02Auto merge of #29291 - petrochenkov:privacy, r=alexcrichtonbors-0/+6
The public set is expanded with trait items, impls and their items, foreign items, exported macros, variant fields, i.e. all the missing parts. Now it's a subset of the exported set. This is needed for https://github.com/rust-lang/rust/pull/29083 because stability annotation pass uses the public set and all things listed above need to be annotated. Rustdoc can now be migrated to the public set as well, I guess. Exported set is now slightly more correct with regard to exported items in blocks - 1) blocks in foreign items are considered and 2) publicity is not inherited from the block's parent - if a function is public it doesn't mean structures defined in its body are public. r? @alexcrichton or maybe someone else
2015-11-01Auto merge of #29501 - Manishearth:pat-docs, r=alexcrichtonbors-3/+3
None
2015-11-01Add code formatting on PatVec docsManish Goregaokar-2/+2
2015-11-01Fix PatEnum docsManish Goregaokar-1/+1
2015-10-31Remove PatWildMultiVadim Petrochenkov-12/+2
2015-10-25syntax/rustc_front: Simplify VariantData::fieldsVadim Petrochenkov-12/+6
And use VariantData instead of P<VariantData> in Item_ and Variant_
2015-10-25rustc_privacy: Expand public node set, build exported node set more correctlyVadim Petrochenkov-0/+6
2015-10-15Auto merge of #28980 - nrc:unsafe-macros, r=@pnkfelixbors-2/+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-13Comment on the purpose(s) of NodeId in VariantDataVadim Petrochenkov-0/+11
2015-10-13Merge VariantData and VariantData_Vadim Petrochenkov-17/+14
2015-10-13Merge struct fields and struct kindVadim Petrochenkov-7/+29
2015-10-13Dict -> Struct, StructDef -> VariantData, def -> dataVadim Petrochenkov-4/+4
2015-10-13Provide span for visit_struct_def + remove some dead codeVadim Petrochenkov-6/+0
2015-10-13Remove now redundant NodeId from VariantVadim Petrochenkov-1/+0
2015-10-13Decouple structure kinds from NodeIdsVadim Petrochenkov-10/+9
2015-10-13Unify structures and enum variants in ASTVadim Petrochenkov-1/+1
2015-10-12Remove the push_unsafe! and pop_unsafe! macros.Nick Cameron-2/+0
This is a [breaking change].
2015-10-09Some cleanup of no longer used AST thingsNick Cameron-11/+2
2015-10-09Cache ids between lowering runsNick Cameron-0/+1
So that lowering is reproducible
2015-10-09Move `for` loop desugaring to loweringNick Cameron-0/+4
2015-10-03libsyntax: Do not derive Hash for IdentVadim Petrochenkov-13/+27
2015-10-02Auto merge of #28793 - Ms2ger:AttrStyle, r=alexcrichtonbors-6/+5
2015-10-01Stop re-exporting AttrStyle's variants and rename them.Ms2ger-6/+5
2015-10-01Convert DefId to use DefIndex, which is an index into a list ofNiko Matsakis-2/+2
paths, and construct paths for all definitions. Also, stop rewriting DefIds for closures, and instead just load the closure data from the original def-id, which may be in another crate.
2015-10-01Auto merge of #28577 - jethrogb:topic/ast-stmt-debug, r=pcwaltonbors-1/+3
This enables the Debug trait to work on syntax::ast::Stmt.
2015-09-28Fill in some missing parts in the default AST visitorVadim Petrochenkov-0/+7
+ Add helper macro for walking lists (including Options)
2015-09-26Auto merge of #28642 - petrochenkov:name3, r=nrcbors-88/+51
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/+51
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-3/+3
2015-09-22Encode/decode Names as stringsVadim Petrochenkov-2/+13
2015-09-21Change syntax::ast_util::stmt_id to not panic on macrosJethro Beekman-1/+3
This enables the Debug trait to work on syntax::ast::Stmt