summary refs log tree commit diff
path: root/src/test/ui/parser
AgeCommit message (Collapse)AuthorLines
2019-03-16Add regression test for #58886Esteban Küber-0/+53
2019-03-16Bail when encountering a second unexpected token in the same spanEsteban Küber-16/+1
2019-02-25Stabilize `unrestricted_attribute_tokens`Vadim Petrochenkov-3/+1
2019-02-25Restrict value in key-value attributes to literalsVadim Petrochenkov-2/+2
2019-02-24Rollup merge of #57364 - hdhoang:33418_negative_bounds, r=estebankMazdak Farrokhzad-0/+72
Improve parsing diagnostic for negative supertrait bounds closes #33418 r? @estebank
2019-02-23Rollup merge of #58526 - pmccarter:master, r=estebankMazdak Farrokhzad-0/+19
Special suggestion for illegal unicode curly quote pairs Fixes #58436 Did not end up expanding the error message span to include the full string literal since I figured the start of the token was the issue, while the help suggestion span would include up to the closing quotation mark. The look ahead logic does not affect the reader position, not sure if that is an issue (if eg it should still continue to parse after the closing quote without erroring out).
2019-02-23Improve parsing diagnostic for negative supertrait boundsHoàng Đức Hiếu-0/+72
2019-02-22Rollup merge of #58198 - ↵Mazdak Farrokhzad-4/+4
igorsdv:suggest-removing-parentheses-surrounding-lifetimes, r=estebank Suggest removing parentheses surrounding lifetimes Fixes #57386. r? @estebank
2019-02-16ui test for directed quote help suggestion #58436Patrick McCarter-0/+19
2019-02-09Auto merge of #57944 - estebank:unclosed-delim-the-quickening, r=oli-obkbors-21/+13
Deduplicate mismatched delimiter errors Delay unmatched delimiter errors until after the parser has run to deduplicate them when parsing and attempt recovering intelligently. Second attempt at #54029, follow up to #53949. Fix #31528.
2019-02-07Suggest removing parentheses surrounding lifetimesIgor Sadikov-4/+4
2019-02-07Update testsvarkor-57/+25
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07tweak wording based on in person feedbackEsteban Küber-7/+5
2019-02-07Deduplicate mismatched delimiter errorsEsteban Küber-25/+19
Delay unmatched delimiter errors until after the parser has run to deduplicate them when parsing and attempt recovering intelligently.
2019-01-27Update comment in test which has changed its purposeMark Rousskov-4/+2
2019-01-25Suggestion moving types before associated types.David Wood-0/+4
This commit extends existing suggestions to move lifetimes before types in generic arguments to also suggest moving types behind associated type bindings.
2019-01-24Rollup merge of #57795 - estebank:did-you-mean, r=zackmdavisMazdak Farrokhzad-4/+4
Use structured suggestion in stead of notes
2019-01-24Rollup merge of #57779 - estebank:recover-struct-fields, r=davidtwcoMazdak Farrokhzad-34/+39
Recover from parse errors in literal struct fields and incorrect float literals Fix #52496.
2019-01-21Accept more invalid code that is close to correct fieldsEsteban Küber-11/+3
2019-01-20Use structured suggestion in stead of notesEsteban Küber-4/+4
2019-01-21Rollup merge of #57784 - JohnTitor:improve-error-message, r=estebankMazdak Farrokhzad-3/+3
Add span for bad doc comment Fixes #57382 r? @estebank
2019-01-21Rollup merge of #57768 - estebank:type-args-sugg, r=zackmdavisMazdak Farrokhzad-6/+6
Continue parsing after parent type args and suggest using angle brackets ``` error[E0214]: parenthesized parameters may only be used with a trait --> $DIR/E0214.rs:2:15 | LL | let v: Vec(&str) = vec!["foo"]; | ^^^^^^ | | | only traits may use parentheses | help: use angle brackets instead: `<&str>` ``` r? @zackmdavis
2019-01-20Tweak field parse error recoveryEsteban Küber-19/+9
2019-01-21Fix testsYuki Okushi-3/+3
2019-01-20Recover from parse errors in struct literal fieldsEsteban Küber-7/+30
Attempt to recover from parse errors while parsing a struct's literal fields by skipping tokens until a comma or the closing brace is found. This allows errors in other fields to be reported.
2019-01-20Auto merge of #57651 - JohnTitor:give-char-type, r=estebankbors-43/+111
Implement new literal type `Err` Fixes #57384 I removed `return Ok`, otherwise, two errors occur. Any solutions? r? @estebank
2019-01-20Remove whitespaceYuki Okushi-5/+4
2019-01-20Fix testsYuki Okushi-96/+56
2019-01-19Suggest usage of angle bracketsEsteban Küber-6/+6
2019-01-20[WIP] Fix testsYuki Okushi-6/+91
2019-01-18Fix testsYuki Okushi-4/+50
2019-01-16Auto merge of #57321 - petrochenkov:atokens, r=nikomatsakisbors-3/+11
Implement basic input validation for built-in attributes Correct top-level shape (`#[attr]` vs `#[attr(...)]` vs `#[attr = ...]`) is enforced for built-in attributes, built-in attributes must also fit into the "meta-item" syntax (aka the "classic attribute syntax"). For some subset of attributes (found by crater run), errors are lowered to deprecation warnings. NOTE: This PR previously included https://github.com/rust-lang/rust/pull/57367 as well.
2019-01-16Fix testsYuki Okushi-24/+2
2019-01-13Implement basic input validation for built-in attributesVadim Petrochenkov-3/+11
2019-01-12Suggest correct location for lifetime parameters in useEsteban Küber-31/+30
2019-01-12Remove unrelated errors from parse stderr testsEsteban Küber-86/+28
2019-01-11Add label for invalid literal suffixEsteban Küber-6/+6
2019-01-11Tweak incorrect discriminator value variant errorEsteban Küber-19/+40
2019-01-11Small tweaks to parser errorsEsteban Küber-17/+19
2019-01-11Tweak type argument after assoc type errorEsteban Küber-1/+1
2019-01-11Continue evaluating after finding incorrect .. in patternEsteban Küber-8/+32
2019-01-11fix testEsteban Küber-0/+1
2019-01-11Continue evaluating after incorrect float literalEsteban Küber-11/+49
2019-01-11fix testsEsteban Küber-2/+3
2019-01-11Continue evaluating after type argument in where clauseEsteban Küber-2/+10
2019-01-11Continue evaluating after missing `for` in `impl Trait for Foo`Esteban Küber-7/+28
2019-01-11Continue evaluating after parsing incorrect binary literalEsteban Küber-5/+18
2019-01-11Continue parsing after lifetime in incorrect locationEsteban Küber-4/+48
2019-01-06tests: Do not use `-Z parse-only`, continue compilation to test recoveryVadim Petrochenkov-853/+735
2019-01-01Auto merge of #57209 - estebank:suggest-raw-ident, r=petrochenkovbors-0/+32
Suggest using raw identifiers in 2018 edition when using keywords