about summary refs log tree commit diff
path: root/src/libsyntax/fold.rs
AgeCommit message (Collapse)AuthorLines
2018-10-26Give each PathSegment a NodeIdNick Cameron-1/+3
2018-10-23Remove redundant cloneShotaro Yamada-1/+1
2018-09-27Auto merge of #52319 - tinco:issue_12590, r=pnkfelixbors-1/+3
Track whether module declarations are inline (fixes #12590) To track whether module declarations are inline I added a field `inline: bool` to `ast::Mod`. The main use case is for pretty to know whether it should render the items associated with the module, but perhaps there are use cases for this information to not be forgotten in the AST.
2018-09-26Remove OneVectorljedrz-15/+25
2018-09-10Track whether module declarations are inline (fixes #12590)Tinco Andringa-1/+3
2018-09-08Track distinct spans for open and close delimiterDavid Tolnay-4/+7
2018-09-01Auto merge of #53815 - F001:if-let-guard, r=petrochenkovbors-1/+11
refactor match guard This is the first step to implement RFC 2294: if-let-guard. Tracking issue: https://github.com/rust-lang/rust/issues/51114 The second step should be introducing another variant `IfLet` in the Guard enum. I separated them into 2 PRs for the convenience of reviewers. r? @petrochenkov
2018-08-30introduce Guard enumF001-1/+11
2018-08-23Auto merge of #53384 - gootorov:use-servo-smallvec, r=michaelwoeristerbors-9/+10
Use optimized SmallVec implementation This PR replaces current SmallVec implementation with the one from the Servo project. Closes https://github.com/rust-lang/rust/issues/51640 r? @Mark-Simulacrum
2018-08-23Auto merge of #52602 - scottmcm:tryblock-expr, r=nikomatsakisbors-1/+1
Implement try block expressions I noticed that `try` wasn't a keyword yet in Rust 2018, so... ~~Fix​es https://github.com/rust-lang/rust/issues/52604~~ That was fixed by PR https://github.com/rust-lang/rust/pull/53135 cc https://github.com/rust-lang/rust/issues/31436 https://github.com/rust-lang/rust/issues/50412
2018-08-23Use optimized SmallVec implementationIgor Gutorov-9/+10
2018-08-19Rename `Catch` variants to `TryBlock`Scott McMurray-1/+1
(Not `Try` since `QuestionMark` is using that.)
2018-08-19mv (mod) codemap source_mapDonato Sciarra-1/+1
2018-08-13Move SmallVec and ThinVec out of libsyntaxljedrz-18/+19
2018-07-18Implement existential typesOliver Schneider-0/+7
2018-06-27Generate `DefId`s for the impl trait of `async` functionsOliver Schneider-10/+21
2018-06-27Generate the `NodeId` for `existential type` in the ASTOliver Schneider-2/+2
2018-06-26inclusive range syntax lint (`...` → `..=`)Zack M. Davis-2/+2
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-21async await desugaring and testsTaylor Cramer-2/+23
2018-06-21Parse async fn header.Without Boats-5/+3
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-6/+6
2018-06-20Make GenericBound explicitvarkor-3/+5
2018-06-20Rename ParamBound(s) to GenericBound(s)varkor-8/+8
2018-06-20Rename TraitTyParamBound to ParamBound::Traitvarkor-2/+2
2018-06-20Take advantage of the lifetime refactoringvarkor-31/+29
2018-06-20Lift bounds into GenericParamvarkor-12/+11
2018-06-20Rename structures in astvarkor-12/+12
2018-06-20Refactor ast::GenericParam as a structvarkor-21/+6
2018-06-20Rename ast::GenericParam and ast::GenericArgvarkor-11/+11
It's so confusing to have everything having the same name, at least while refactoring.
2018-06-20Make method and variable names more consistentvarkor-20/+24
2018-06-20Rename "parameter" to "arg"varkor-19/+19
2018-06-20Rename PathParameter(s) to GenericArg(s)varkor-25/+16
2018-06-20Rename *Parameter to *Paramvarkor-7/+7
2018-06-20Consolidate PathParameters and AngleBracketedParameterDatavarkor-3/+19
2018-06-14create multiple HIR items for a use statementQuietMisdreavus-2/+3
2018-06-12add fold::Folder::fold_qpathMichael Lamparski-25/+24
2018-05-30syntax: remove overloading of fold_lifetime{,_def}{,s}.Eduard-Mihai Burtescu-54/+20
2018-05-24restore emplacement syntax (obsolete)Niko Matsakis-0/+3
2018-05-24Auto merge of #50971 - alexcrichton:no-stringify, r=petrochenkovbors-0/+1
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-22add `Span` information into `Qself`Niko Matsakis-3/+9
2018-05-22rustc: Correctly pretty-print macro delimitersAlex Crichton-0/+1
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-5/+17
constants".
2018-05-16label-break-value: Parsing and AST/HIR changesest31-1/+4
2018-05-13Macros: Add a 'literal' fragment specifierDan Aloni-0/+1
Implements RFC 1576. See: https://github.com/rust-lang/rfcs/blob/master/text/1576-macros-literal-matcher.md Changes are mostly in libsyntax, docs, and tests. Feature gate is enabled for 1.27.0. Many thanks to Vadim Petrochenkov for following through code reviews and suggestions. Example: ````rust macro_rules! test_literal { ($l:literal) => { println!("literal: {}", $l); }; ($e:expr) => { println!("expr: {}", $e); }; } fn main() { let a = 1; test_literal!(a); test_literal!(2); test_literal!(-3); } ``` Output: ``` expr: 1 literal: 2 literal: -3 ```
2018-04-12AST/HIR: Merge field access expressions for named and numeric fieldsVadim Petrochenkov-5/+0
2018-04-06Use `Ident` instead of `Name` in `MetaItem`Vadim Petrochenkov-1/+1
2018-04-06Make lifetime nonterminals closer to identifier nonterminalsVadim Petrochenkov-2/+2
2018-04-06Remove more duplicated spansVadim Petrochenkov-7/+2
2018-04-06Rename `ast::Variant_::name` into `ident` + Fix rebaseVadim Petrochenkov-1/+1
2018-04-06Get rid of `SpannedIdent`Vadim Petrochenkov-15/+11