about summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
AgeCommit message (Collapse)AuthorLines
2018-08-01Switch syntax attribute tracking to BitVectorMark Rousskov-1/+11
2018-07-29Replace push loops with collect() and extend() where possibleljedrz-8/+2
2018-07-18Implement existential typesOliver Schneider-0/+6
2018-07-15Update clippy and rlsOliver Schneider-3/+3
2018-07-14Address commentsVadim Petrochenkov-2/+3
2018-07-14Remove most of `Hash` impls from AST and HIR structuresVadim Petrochenkov-99/+99
2018-07-14Remove most of `PartialEq` impls from AST and HIR structuresVadim Petrochenkov-100/+115
2018-07-01Auto merge of #51883 - estebank:placement-suggestion, r=varkorbors-0/+10
Suggest correct comparison against negative literal When parsing as emplacement syntax (`x<-1`), suggest the correct syntax for comparison against a negative value (`x< -1`). Fix #45651.
2018-06-28Suggest correct comparison against negative literalEsteban Küber-0/+10
When parsing as emplacement syntax (`x<-1`), suggest the correct syntax for comparison against a negative value (`x< -1`).
2018-06-27Add a convenience method for getting the impl Trait `NodeId` of an `IsAysnc`Oliver Schneider-0/+7
2018-06-27Generate `DefId`s for the impl trait of `async` functionsOliver Schneider-2/+5
2018-06-27Generate the `NodeId` for `existential type` in the ASTOliver Schneider-1/+5
2018-06-26inclusive range syntax lint (`...` → `..=`)Zack M. Davis-1/+1
Our implementation ends up changing the `PatKind::Range` variant in the AST to take a `Spanned<RangeEnd>` instead of just a `RangeEnd`, because the alternative would be to try to infer the span of the range operator from the spans of the start and end subexpressions, which is both hideous and nontrivial to get right (whereas getting the change to the AST right was a simple game of type tennis). This is concerning #51043.
2018-06-26migrate codebase to `..=` inclusive range patternsZack M. Davis-2/+2
These were stabilized in March 2018's #47813, and are the Preferred Way to Do It going forward (q.v. #51043).
2018-06-21async await desugaring and testsTaylor Cramer-2/+22
2018-06-21Parse async fn header.Without Boats-5/+32
This is gated on edition 2018 & the `async_await` feature gate. The parser will accept `async fn` and `async unsafe fn` as fn items. Along the same lines as `const fn`, only `async unsafe fn` is permitted, not `unsafe async fn`.The parser will not accept `async` functions as trait methods. To do a little code clean up, four fields of the function type struct have been merged into the new `FnHeader` struct: constness, asyncness, unsafety, and ABI. Also, a small bug in HIR printing is fixed: it previously printed `const unsafe fn` as `unsafe const fn`, which is grammatically incorrect.
2018-06-20Rename ParenthesizedArgData to ParenthesisedArgsvarkor-3/+3
2018-06-20Make GenericBound explicitvarkor-5/+4
2018-06-20Rename ParamBound(s) to GenericBound(s)varkor-13/+13
2018-06-20Rename TraitTyParamBound to ParamBound::Traitvarkor-3/+3
2018-06-20Take advantage of the lifetime refactoringvarkor-1/+1
2018-06-20Remove name from GenericParamKind::Lifetimevarkor-3/+1
2018-06-20Use ParamBounds in WhereRegionPredicatevarkor-1/+1
2018-06-20Lift bounds into GenericParamvarkor-23/+22
2018-06-20Rename structures in astvarkor-10/+10
2018-06-20Remove AngleBracketedArgs implvarkor-22/+0
2018-06-20Remove methods from ast::GenericParam and ast::Genericsvarkor-39/+0
2018-06-20Refactor ast::GenericParam as a structvarkor-25/+22
2018-06-20Rename ast::GenericParam and ast::GenericArgvarkor-14/+14
It's so confusing to have everything having the same name, at least while refactoring.
2018-06-20Make method and variable names more consistentvarkor-4/+4
2018-06-20Rename "parameter" to "arg"varkor-17/+17
2018-06-20Rename PathParameter(s) to GenericArg(s)varkor-14/+14
2018-06-20Rename *Parameter to *Paramvarkor-4/+4
2018-06-20Consolidate PathParameters and AngleBracketedParameterDatavarkor-4/+30
2018-06-14create multiple HIR items for a use statementQuietMisdreavus-3/+6
2018-05-26Auto merge of #51052 - nikomatsakis:obsolete-arrow, r=petrochenkovbors-0/+3
restore emplacement syntax (obsolete) Fix https://github.com/rust-lang/rust/issues/50832 r? @petrochenkov
2018-05-24restore emplacement syntax (obsolete)Niko Matsakis-0/+3
2018-05-24Replace `ScalarKind` with `Primitive`Oliver Schneider-35/+2
2018-05-24Auto merge of #50930 - toidiu:ak-ordOutlivesPredicate, r=nikomatsakisbors-1/+1
implement Ord for OutlivesPredicate and other types It became necessary while implementing https://github.com/rust-lang/rust/pull/50070 to have `Ord` implemented for `OutlivesPredicate`. This PR implements `Ord` for `OutlivesPredicate` as well as other types needed for the implementation.
2018-05-24Auto merge of #50971 - alexcrichton:no-stringify, r=petrochenkovbors-0/+8
rustc: Correctly pretty-print macro delimiters This commit updates the `Mac_` AST structure to keep track of the delimiters that it originally had for its invocation. This allows us to faithfully pretty-print macro invocations not using parentheses (e.g. `vec![...]`). This in turn helps procedural macros due to #43081. Closes #50840
2018-05-24implement Ord for OutlivesPredicate and other typestoidiu-1/+1
2018-05-22add `Span` information into `Qself`Niko Matsakis-0/+5
2018-05-22rustc: Correctly pretty-print macro delimitersAlex Crichton-0/+8
This commit updates the `Mac_` AST structure to keep track of the delimiters that it originally had for its invocation. This allows us to faithfully pretty-print macro invocations not using parentheses (e.g. `vec![...]`). This in turn helps procedural macros due to #43081. Closes #50840
2018-05-19rustc: introduce {ast,hir}::AnonConst to consolidate so-called "embedded ↵Eduard-Mihai Burtescu-6/+18
constants".
2018-05-17Turn some functions from `token.rs` into methods on `Ident`Vadim Petrochenkov-2/+1
2018-05-16label-break-value: Parsing and AST/HIR changesest31-3/+3
2018-05-02make it compile againflip1995-1/+1
2018-05-02Allow Path for name of MetaItemSeiichi Uchida-2/+2
2018-04-30Auto merge of #50092 - abonander:issue-49934, r=petrochenkovbors-1/+1
Warn on pointless #[derive] in more places This fixes the regression in #49934 and ensures that unused `#[derive]` invocations on statements, expressions and generic type parameters survive to trip the `unused_attributes` lint. There is a separate warning hardcoded for `#[derive]` on macro invocations since linting (even the early-lint pass) occurs after expansion. This also adds regression tests for some nodes that were already warning properly. closes #49934
2018-04-29Warn on pointless `#[derive]` in more placesAustin Bonander-1/+1
This fixes the regression in #49934 and ensures that unused `#[derive]`s on statements, expressions and generic type parameters survive to trip the `unused_attributes` lint. For `#[derive]` on macro invocations it has a hardcoded warning since linting occurs after expansion. This also adds regression testing for some nodes that were already warning properly. closes #49934