about summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2019-08-15Remove `Spanned` from `{ast,hir}::FieldPat`Vadim Petrochenkov-14/+8
2019-08-15Remove `Spanned` from `ast::Mac`Vadim Petrochenkov-20/+26
2019-08-15Remove `Spanned` from `mk_name_value_item_str` and `expr_to_spanned_string`Vadim Petrochenkov-2/+2
2019-08-14Rollup merge of #63543 - c410-f3r:variant, r=c410-f3rMazdak Farrokhzad-8/+8
Merge Variant and Variant_ Extracted from #63468.
2019-08-14Rollup merge of #63542 - c410-f3r:node_ids, r=petrochenkovMazdak Farrokhzad-0/+4
Add NodeId for Arm, Field and FieldPat Extracted from #63468
2019-08-14Rollup merge of #63490 - Centril:cleanup-pat-parser, r=petrochenkovMazdak Farrokhzad-190/+235
libsyntax: cleanup and refactor `pat.rs` A smaller refactoring & cleanup of `pat.rs` (best read commit by commit). r? @petrochenkov
2019-08-14Rollup merge of #62984 - nathanwhit:extra_semi_lint, r=varkorMazdak Farrokhzad-1/+16
Add lint for excess trailing semicolons Closes #60876. A caveat (not necessarily a negative, but something to consider) with this implementation is that excess semicolons after return/continue/break now also cause an 'unreachable statement' warning. For the following example: ``` fn main() { extra_semis(); } fn extra_semis() -> i32 { let mut sum = 0;;; for i in 0..10 { if i == 5 { continue;; } else if i == 9 { break;; } else { sum += i;; } } return sum;; } ``` The output is: ``` warning: unnecessary trailing semicolons --> src/main.rs:5:21 | 5 | let mut sum = 0;;; | ^^ help: remove these semicolons | = note: `#[warn(redundant_semicolon)]` on by default warning: unnecessary trailing semicolon --> src/main.rs:8:22 | 8 | continue;; | ^ help: remove this semicolon warning: unnecessary trailing semicolon --> src/main.rs:10:19 | 10 | break;; | ^ help: remove this semicolon warning: unnecessary trailing semicolon --> src/main.rs:12:22 | 12 | sum += i;; | ^ help: remove this semicolon warning: unnecessary trailing semicolon --> src/main.rs:15:16 | 15 | return sum;; | ^ help: remove this semicolon warning: unreachable statement --> src/main.rs:8:22 | 8 | continue;; | ^ | = note: `#[warn(unreachable_code)]` on by default warning: unreachable statement --> src/main.rs:10:19 | 10 | break;; | ^ warning: unreachable statement --> src/main.rs:15:16 | 15 | return sum;; | ^ ```
2019-08-14Merge Variant and Variant_Caio-8/+8
2019-08-14Rollup merge of #63530 - ehuss:typo-statemement, r=centrilMazdak Farrokhzad-1/+1
Fix typo in error message.
2019-08-14Rollup merge of #63475 - iluuu1994:issue-62632, r=CentrilMazdak Farrokhzad-0/+17
Bring back suggestion for splitting `<-` into `< -` Closes #62632
2019-08-13Add NodeId for Arm, Field and FieldPatCaio-0/+4
2019-08-13Apply Centril's suggestionEric Huss-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-08-13Fix typo in error message.Eric Huss-1/+1
2019-08-12Parse excess semicolons as empty stmts for lintingnathanwhit-1/+16
2019-08-12syntax: account for CVarArgs being in the argument list.Eduard-Mihai Burtescu-1/+1
2019-08-12extract parse_pat_{tuple_}struct + recover_one_fewer_dotdotMazdak Farrokhzad-39/+51
2019-08-12extract fatal_unexpected_non_patMazdak Farrokhzad-16/+22
2019-08-12parser/pat: minor misc cleanupMazdak Farrokhzad-13/+15
2019-08-12extract parse_pat_range_starting_with_litMazdak Farrokhzad-20/+21
2019-08-12extract parse_pat_range_starting_with_pathMazdak Farrokhzad-15/+25
2019-08-12extract parse_pat_mac_invocMazdak Farrokhzad-14/+17
2019-08-12extract ban_pat_range_if_ambiguousMazdak Farrokhzad-20/+25
2019-08-12extract recover_pat_ident_mut_firstMazdak Farrokhzad-16/+20
2019-08-12Bring back suggestion for splitting `<-` into `< -`Ilija Tovilo-0/+17
Closes #62632
2019-08-12extract parse_pat_tuple_or_parensMazdak Farrokhzad-12/+14
2019-08-12extract parse_pat_derefMazdak Farrokhzad-12/+16
2019-08-12parse_pat_with_range_pat: remove unnecessary assignments.Mazdak Farrokhzad-29/+25
2019-08-11parser: {check,expect}_lifetime into ty.rsMazdak Farrokhzad-19/+19
2019-08-11parser: move into generics.rsMazdak Farrokhzad-272/+278
2019-08-11parser: move into stmt.rsMazdak Farrokhzad-464/+477
2019-08-11parser: move parse_fn_block_decl into expr.rsMazdak Farrokhzad-60/+56
2019-08-11parser: move parse_ident_or_underscore into item.rsMazdak Farrokhzad-11/+11
2019-08-11parser: split into {ty, path}.rsMazdak Farrokhzad-899/+930
2019-08-11parser: split into {item,module}.rsMazdak Farrokhzad-2218/+2251
2019-08-11parser: split into pat.rsMazdak Farrokhzad-633/+642
2019-08-11parser: split into expr.rsMazdak Farrokhzad-1667/+1712
2019-08-09Recover parser from `foo(_, _)`Esteban Küber-20/+50
2019-08-05add unknown tokenAleksey Kladov-3/+5
2019-08-05remove special code path for unknown tokensAleksey Kladov-60/+13
2019-08-04Auto merge of #63213 - varkor:itemkind-tyalias, r=Centrilbors-2/+2
Rename `ItemKind::Ty` to `ItemKind::TyAlias` The current name is not entirely clear without context and `TyAlias` is consistent with `ItemKind::TraitAlias`.
2019-08-04Rename `ItemImplKind::Type` to `ItemImplKind::TyAlias`varkor-1/+1
2019-08-04Rename `ItemKind::Ty` to `ItemKind::TyAlias`varkor-1/+1
2019-08-04Auto merge of #62816 - estebank:type-ascription-macros, r=petrochenkovbors-6/+36
Point at type ascription before macro invocation on expansion parse error Fix https://github.com/rust-lang/rust/issues/47666. Follow up to https://github.com/rust-lang/rust/pull/62791. r? @petrochenkov
2019-08-03Rollup merge of #63146 - Mark-Simulacrum:clean-attr, r=petrochenkovMazdak Farrokhzad-11/+4
Cleanup syntax::attr Mostly removing needless arguments to constructors r? @petrochenkov
2019-08-03Auto merge of #63180 - varkor:trait-alias-impl-trait, r=Centrilbors-30/+13
Change opaque type syntax from `existential type` to type alias `impl Trait` This implements a new feature gate `type_alias_impl_trait` (this is slightly different from the originally proposed feature name, but matches what has been used in discussion since), deprecating the old `existential_types` feature. The syntax for opaque types has been changed. In addition, the "existential" terminology has been replaced with "opaque", as per previous discussion and the RFC. This makes partial progress towards implementing https://github.com/rust-lang/rust/issues/63063. r? @Centril
2019-08-02Auto merge of #63207 - petrochenkov:outest2, r=Mark-Simulacrumbors-602/+651
Unconfigure compiler unit test files during normal build I haven't touched libstd though, it had a lot of tests and I'm not sure the people maintaining it want this. Closes https://github.com/rust-lang/rust/issues/61097 r? @Mark-Simulacrum
2019-08-02Rollup merge of #63202 - exphp-forks:parser-ice-63135, r=estebankMazdak Farrokhzad-1/+9
Fix ICE in #63135 Closes #63135. r?@estebank
2019-08-02Rollup merge of #63189 - waywardmonkeys:doc-improvements, r=CentrilMazdak Farrokhzad-1/+1
Doc improvements Miscellaneous documentation fixes.
2019-08-02Replace "existential" by "opaque"varkor-12/+6
2019-08-02Switch existential_type to type_alias_impl_traitvarkor-18/+7