about summary refs log tree commit diff
path: root/src/libsyntax/fold.rs
AgeCommit message (Collapse)AuthorLines
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
2018-04-06Rename `PathSegment::identifier` to `ident`Vadim Petrochenkov-3/+3
2018-04-05Rollup merge of #49350 - abonander:macros-in-extern, r=petrochenkovAlex Crichton-3/+17
Expand macros in `extern {}` blocks This permits macro and proc-macro and attribute invocations (the latter only with the `proc_macro` feature of course) in `extern {}` blocks, gated behind a new `macros_in_extern` feature. A tracking issue is now open at #49476 closes #48747
2018-04-03expand macro invocations in `extern {}` blocksAustin Bonander-3/+17
2018-04-03Remove all unstable placement featuresAidan Hobson Sayers-3/+0
Closes #22181, #27779
2018-03-18Initial implementation of RFC 2151, Raw IdentifiersLymia Aluysia-2/+3
2018-03-17Rename `Span::empty` to `Span::shrink_to_lo`, add `Span::shrink_to_hi`Vadim Petrochenkov-1/+1
2018-03-17AST: Make renames in imports closer to the sourceVadim Petrochenkov-1/+2
Fix `unused_import_braces` lint false positive on `use prefix::{self as rename}`
2018-03-17AST/HIR: Clarify what the optional name in extern crate items meanVadim Petrochenkov-1/+1
2018-03-14Remove syntax and syntax_pos thread localsJohn Kåre Alsaker-19/+24
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-2/+2
2018-03-01Support parentheses in patterns under feature gateVadim Petrochenkov-0/+1
Improve recovery for trailing comma after `..`
2018-02-24Implement multiple patterns with `|` in `if let` and `while let`Vadim Petrochenkov-4/+4
2018-02-18Replace dummy spans with empty spansSeiichi Uchida-2/+2
2018-02-18Change ast::Visibility to Spanned typeSeiichi Uchida-8/+9
2018-02-18Add a span field to Visibility::RestrictedSeiichi Uchida-2/+3
This span covers the whole visibility expression: e.g. `pub (in path)`.
2018-01-30stabilize match_beginning_vertJonathan Goodman-2/+1
2018-01-25Rollup merge of #47502 - petrochenkov:label, r=eddybAlex Crichton-19/+24
AST/HIR: Add a separate structure for labels
2018-01-23Adds support for immovable generators. Move checking of invalid borrows ↵John Kåre Alsaker-1/+2
across suspension points to borrowck. Fixes #44197, #45259 and #45093.
2018-01-22AST/HIR: Add a separate structure for labelsVadim Petrochenkov-19/+24
2018-01-13Remove `impl Foo for ..` in favor of `auto trait Foo`leonardo.yvens-3/+0
No longer parse it. Remove AutoTrait variant from AST and HIR. Remove backwards compatibility lint. Remove coherence checks, they make no sense for the new syntax. Remove from rustdoc.
2017-12-28Resurrecting #33135Michael Hewson-0/+1
Started rebasing @sgrif's PR #33135 off of current master. (Well, actually merging it into a new branch based off current master.) The following files still need to be fixed or at least reviewed: - `src/libsyntax/ext/tt/macro_parser.rs`: calls `Parser::parse_lifetime`, which doesn't exist anymore - `src/libsyntax/parse/parser.rs`: @sgrif added an error message to `Parser::parse_lifetime`. Code has since been refactored, so I just took it out for now. - `src/libsyntax/ext/tt/transcribe.rs`: This code has been refactored bigtime. Not sure whether @sgrif's changes here are still necessary. Took it out for this commit.
2017-12-22Auto merge of #46732 - estebank:silence-recovered-blocks, r=petrochenkovbors-1/+2
Do not emit type errors on recovered blocks When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user. Fix #44579.
2017-12-21Do not emit type errors on recovered blocksEsteban Küber-1/+2
When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user.
2017-12-21Add GenericParam, refactor Generics in ast, hir, rustdocJonas Platte-12/+25
The Generics now contain one Vec of an enum for the generic parameters, rather than two separate Vec's for lifetime and type parameters. Additionally, places that previously used Vec<LifetimeDef> now use Vec<GenericParam> instead.
2017-12-14add trait aliases to ASTAlex Burka-0/+3
2017-11-30Implement RFC 2128 (use_nested_groups)Pietro Albini-27/+15
This commit adds support for nested groups inside `use` declarations, such as `use foo::{bar, sub::{baz::Foo, *}};`.
2017-11-03add `auto` keyword, parse `auto trait`, lower to HIRleonardo.yvens-1/+2
Adds an `IsAuto` field to `ItemTrait` which flags if the trait was declared as an `auto trait`. Auto traits cannot have generics nor super traits.
2017-11-03[Syntax Breaking] Rename DefaultImpl to AutoImplleonardo.yvens-2/+2
DefaultImpl is a highly confusing name for what we now call auto impls, as in `impl Send for ..`. The name auto impl is not formally decided but for sanity anything is better than `DefaultImpl` which refers neither to `default impl` nor to `impl Default`.
2017-10-27Implement RFC 1861: Extern typesPaul Lietar-0/+1
2017-10-17Lifting Generics from MethodSig to TraitItem and ImplItem since we want to ↵Sunjay Varma-1/+2
support generics in each variant of TraitItem and ImplItem
2017-10-14Implement `dyn Trait` syntaxVadim Petrochenkov-2/+2
2017-09-01Implement RFC 1925Matt Ickstadt-1/+3