about summary refs log tree commit diff
path: root/src/test/ui/parser
AgeCommit message (Collapse)AuthorLines
2019-08-27Improve 'mut ' diagnostic.Mazdak Farrokhzad-14/+43
2019-08-27Ensure 'let mut ;' where ':pat' is banned.Mazdak Farrokhzad-1/+18
2019-08-27recover on 'mut ' and improve recovery for keywords.Mazdak Farrokhzad-99/+308
2019-08-25parser: gracefully handle `fn foo(A | B: type)`.Mazdak Farrokhzad-40/+34
2019-08-24parser: `let` stmts & `for` exprs: allow or-patterns.Mazdak Farrokhzad-32/+33
2019-08-17initial implementation of or-pattern parsingDan Robertson-12/+14
Initial implementation of parsing or-patterns e.g., `Some(Foo | Bar)`. This is a partial implementation of RFC 2535.
2019-08-12Update tests for excess semicolon lintNathan-0/+10
2019-08-09review comments: typo and rewordingEsteban Küber-2/+2
2019-08-09review comment: review wording or missing return errorEsteban Küber-2/+2
2019-08-09Tweak wording of fn without explicit returnEsteban Küber-2/+2
2019-08-09Change wording for function without return valueEsteban Küber-2/+2
Fix #62677
2019-08-05remove special code path for unknown tokensAleksey Kladov-1/+24
2019-08-03Auto merge of #63180 - varkor:trait-alias-impl-trait, r=Centrilbors-22/+16
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-02Rollup merge of #63202 - exphp-forks:parser-ice-63135, r=estebankMazdak Farrokhzad-0/+47
Fix ICE in #63135 Closes #63135. r?@estebank
2019-08-02Update syntax in existing testsvarkor-22/+16
2019-08-01Fix ICE in #63135Michael Lamparski-0/+47
2019-08-01Rollup merge of #63122 - Centril:fix-63115, r=petrochenkovPietro Albini-1/+126
Account for `maybe_whole_expr` in range patterns Fixes https://github.com/rust-lang/rust/issues/63115 (fallout from https://github.com/rust-lang/rust/pull/62550). r? @petrochenkov
2019-07-30Rollup merge of #62928 - Centril:recover-parens-around-for-head, r=estebankMazdak Farrokhzad-0/+42
Syntax: Recover on `for ( $pat in $expr ) $block` Fixes #62724 by adding some recovery: ``` error: unexpected closing `)` --> $DIR/recover-for-loop-parens-around-head.rs:10:23 | LL | for ( elem in vec ) { | --------------^ | | | opening `(` | help: remove parenthesis in `for` loop: `elem in vec` ``` The last 2 commits are drive-by cleanups. r? @estebank
2019-07-30Account for maybe_whole_expr in range patterns.Mazdak Farrokhzad-1/+126
2019-07-28Rollup merge of #62995 - estebank:issue-62973, r=varkorMazdak Farrokhzad-0/+69
Avoid ICE when suggestion span is at Eof Fix #62973.
2019-07-28Recover 'for ( $pat in $expr ) $block'.Mazdak Farrokhzad-0/+42
2019-07-28Rollup merge of #62550 - Centril:rest-patterns, r=petrochenkovMazdak Farrokhzad-58/+833
Implement RFC 2707 + Parser recovery for range patterns Implement https://github.com/rust-lang/rfcs/pull/2707. - Add a new basic syntactic pattern form `ast::PatKind::Rest` (parsed as `..` or `DOTDOT`) and simplify `ast::PatKind::{Slice, Tuple, TupleStruct}` as a result. - Lower `ast::PatKind::Rest` in combination with the aforementioned `PatKind` variants as well as `PatKind::Ident`. The HIR remains unchanged for now (may be advisable to make slight adjustments later). - Refactor `parser.rs` wrt. parsing sequences and lists of things in the process. - Add parser recovery for range patterns of form `X..`, `X..=`, `X...`, `..Y`, `..=Y`, and `...Y`. This should make it easy to actually support these patterns semantically later if we so desire. cc https://github.com/rust-lang/rust/issues/62254 r? @petrochenkov
2019-07-28And --bless tests accordingly for those exceptions.Mazdak Farrokhzad-476/+167
2019-07-28Address comments re. off-topic errors.Mazdak Farrokhzad-44/+48
2019-07-28--bless tests after rebase.Mazdak Farrokhzad-5/+5
2019-07-28Win some lose some; Unfortunately we lost recovery in one case.Mazdak Farrokhzad-20/+4
2019-07-28(pat, ..,) is now syntactically legal.Mazdak Farrokhzad-9/+2
2019-07-28Account for better recovery in two cases.Mazdak Farrokhzad-2/+43
2019-07-28--bless tests due to new subslice syntax.Mazdak Farrokhzad-10/+49
2019-07-28Use new 'p @ ..' syntax in tests.Mazdak Farrokhzad-1/+1
2019-07-28Test parsing and recovery of all sorts of range patterns.Mazdak Farrokhzad-0/+949
2019-07-28And also --bless those recovery tests.Mazdak Farrokhzad-7/+71
2019-07-28Update tests wrt. recovery of range patterns.Mazdak Farrokhzad-2/+12
2019-07-27Fix ui/parser/attr testEvgenii P-2/+2
2019-07-27Fix failing UI testsEvgenii P-3/+8
2019-07-27Make more informative error on outer attr after innerEvgenii P-2/+5
2019-07-26ignore-tidy-trailing-newlinesEsteban Küber-1/+1
2019-07-26Rollup merge of #62963 - estebank:homoglyph-recovery, r=petrochenkovMazdak Farrokhzad-0/+26
Allow lexer to recover from some homoglyphs
2019-07-25Avoid ICE when suggestion span is at EofEsteban Küber-0/+69
2019-07-25Rollup merge of #62887 - estebank:issue-62881, r=petrochenkovMazdak Farrokhzad-0/+95
Make the parser TokenStream more resilient after mismatched delimiter recovery Fix #62881, fix #62895.
2019-07-24Allow lexer to recover from some homoglyphsEsteban Küber-0/+26
2019-07-24Rollup merge of #62917 - estebank:trailing-slash, r=matkladMazdak Farrokhzad-0/+19
Always emit trailing slash error Fix #62913. r? @petrochenkov
2019-07-23Always emit trailing slash errorEsteban Küber-0/+19
2019-07-23review commentsEsteban Küber-0/+95
2019-07-23Rollup merge of #62791 - estebank:type-ascription, r=petrochenkovMark Rousskov-13/+10
Handle more cases of typos misinterpreted as type ascription Fix #60933, #54516. CC #47666, #34255, #48016.
2019-07-22fix lexing of comments with many \rAleksey Kladov-0/+30
closes #62863
2019-07-20Introduce rustc_lexerAleksey Kladov-7/+7
The idea here is to make a reusable library out of the existing rust-lexer, by separating out pure lexing and rustc-specific concerns, like spans, error reporting an interning. So, rustc_lexer operates directly on `&str`, produces simple tokens which are a pair of type-tag and a bit of original text, and does not report errors, instead storing them as flags on the token.
2019-07-19Handle more cases of typos misinterpreted as type ascriptionEsteban Küber-13/+10
2019-07-17normalize use of backticks in compiler messages for librustc/lintSamy Kacimi-1/+1
https://github.com/rust-lang/rust/issues/60532
2019-07-16Rollup merge of #62703 - ↵Mark Rousskov-1/+1
fakenine:normalize_use_of_backticks_compiler_messages_p6, r=eddyb normalize use of backticks in compiler messages for libsyntax/parse https://github.com/rust-lang/rust/issues/60532