about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser
AgeCommit message (Collapse)AuthorLines
2019-08-15`Ident::with_empty_ctxt` -> `Ident::with_dummy_span`Vadim Petrochenkov-1/+1
`Ident` has had a full span rather than just a `SyntaxContext` for a long time now.
2019-08-15Remove `Spanned` from `{ast,hir}::FieldPat`Vadim Petrochenkov-14/+8
2019-08-15Remove `Spanned` from `ast::Mac`Vadim Petrochenkov-19/+25
2019-08-14Rollup merge of #63543 - c410-f3r:variant, r=c410-f3rMazdak Farrokhzad-2/+3
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-2/+3
2019-08-14Rollup merge of #63530 - ehuss:typo-statemement, r=centrilMazdak Farrokhzad-1/+1
Fix typo in error message.
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-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-2/+18
2019-08-11parser: move into generics.rsMazdak Farrokhzad-2/+276
2019-08-11parser: move into stmt.rsMazdak Farrokhzad-6/+468
2019-08-11parser: move parse_fn_block_decl into expr.rsMazdak Farrokhzad-9/+55
2019-08-11parser: move parse_ident_or_underscore into item.rsMazdak Farrokhzad-0/+11
2019-08-11parser: split into {ty, path}.rsMazdak Farrokhzad-0/+921
2019-08-11parser: split into {item,module}.rsMazdak Farrokhzad-0/+2231
2019-08-11parser: split into pat.rsMazdak Farrokhzad-0/+634
2019-08-11parser: split into expr.rsMazdak Farrokhzad-0/+1703