about summary refs log tree commit diff
path: root/src/test/ui/parser
AgeCommit message (Collapse)AuthorLines
2020-05-07reword "possible candidate" import suggestionAndy Russell-1/+1
2020-04-23Moving more build-pass tests to check-passVal Markovic-1/+1
One or two tests became build-pass without the FIXME because they really needed build-pass (were failing without it). Helps with #62277
2020-04-23Rollup merge of #70633 - kper:master, r=estebankDylan DPC-0/+69
Confusing suggestion on incorrect closing `}` Compiler returns ``` error: unexpected closing delimiter: `}` --> main.rs:20:1 | 9 | ErrorHandled::Reported => {} | -- this block is empty, you might have not meant to close it temp ... 20 | } | ^ unexpected closing delimiter error: aborting due to previous error ```
2020-04-22Update UI testsGuillaume Gomez-2/+4
2020-04-15Do not ICE in the face of invalid enum discriminantEsteban Küber-0/+158
2020-04-11rustc: Add a warning count upon completionRoccoDev-4/+6
2020-04-06Rollup merge of #70519 - estebank:constraints-before-args-spans, r=CentrilMazdak Farrokhzad-1/+6
Tweak output of type params and constraints in the wrong order r? @Centril @varkor
2020-04-04Drop `this` in error message to not reach 100 charactersKevin Per-2/+2
2020-04-04Show open and closed braces of last proper blockKevin Per-2/+15
2020-04-03Fixing testsKevin Per-4/+7
2020-04-03Auto merge of #70642 - eddyb:remap-sysroot-src, r=Mark-Simulacrumbors-9/+4
Translate the virtual `/rustc/$hash` prefix back to a real directory. Closes #53486 and fixes #53081, by undoing the remapping to `/rustc/$hash` on the fly, when appropriate (e.g. our testsuites, or user crates that depend on `libstd`), but not during the Rust build itself (as that could leak the absolute build directory into the artifacts, breaking deterministic builds). Tested locally by setting `remap-debuginfo = true` in `config.toml`, which without these changes, was causing 56 tests to fail (see https://github.com/rust-lang/rust/issues/53081#issuecomment-606703215 for more details). cc @Mark-Simulacrum @alexcrichton @ehuss
2020-04-02Rollup merge of #70681 - rcoh:russell/70677-raw-str-panic, r=petrochenkovMazdak Farrokhzad-0/+14
Handle unterminated raw strings with no #s properly The modified code to handle parsing raw strings didn't properly account for the case where there was no "#" on either end and erroneously reported this strings as complete. This lead to a panic trying to read off the end of the file. Fixes #70677 r? @petrochenkov cc @Centril
2020-04-02Rollup merge of #70421 - Centril:recover-const-async-fn-ptr, r=estebankMazdak Farrokhzad-1/+181
parse: recover on `const fn()` / `async fn()` Recover on `const fn()` and `async fn()` function pointers, suggesting to remove the qualifier. For example: ``` error: an `fn` pointer type cannot be `async` --> $DIR/recover-const-async-fn-ptr.rs:6:11 | LL | type T3 = async fn(); | -----^^^^^ | | | `async` because of this | help: remove the `async` qualifier ``` r? @estebank
2020-04-02tests: remove ignore directives from tests that mention core/alloc/std spans.Eduard-Mihai Burtescu-9/+4
2020-04-02Writing testsKevin Per-0/+53
2020-04-02Handle unterminated raw strings with no #s properlyRussell Cohen-0/+14
The modified code to handle parsing raw strings didn't properly account for the case where there was no "#" on either end and erroneously reported this strings as complete. This lead to a panic trying to read off the end of the file.
2020-04-01Rollup merge of #70522 - rcoh:60762-raw-string-errors, r=petrochenkovMazdak Farrokhzad-15/+50
Improve error messages for raw strings (#60762) This diff improves error messages around raw strings in a few ways: - Catch extra trailing `#` in the parser. This can't be handled in the lexer because we could be in a macro that actually expects another # (see test) - Refactor & unify error handling in the lexer between ByteStrings and RawByteStrings - Detect potentially intended terminators (longest sequence of "#*" is suggested) Fixes #60762 cc @estebank who reviewed the original (abandoned) PR for the same ticket. r? @Centril
2020-04-01Rollup merge of #70556 - Centril:fix-70552, r=estebankDylan DPC-0/+11
parse_and_disallow_postfix_after_cast: account for `ExprKind::Err`. Fixes https://github.com/rust-lang/rust/issues/70552. r? @estebank cc @daboross
2020-03-30try_resolve_as_non_binding: span_bug -> delay_span_bugMazdak Farrokhzad-0/+74
2020-03-30parse_and_disallow_postfix_after_cast: account for `ExprKind::Err`.Mazdak Farrokhzad-0/+11
2020-03-29review comment: wordingEsteban Küber-1/+1
2020-03-29Suggest correct order for arguments when encountering early constraintsEsteban Küber-3/+3
When encountering constraints before type arguments or lifetimes, suggest the correct order.
2020-03-29More raw string testsRussell Cohen-1/+16
2020-03-29Cleanup error messages, improve docstringsRussell Cohen-4/+4
2020-03-29Improve error messages for raw strings (#60762)Russell Cohen-5/+25
This diff improves error messages around raw strings in a few ways: - Catch extra trailing `#` in the parser. This can't be handled in the lexer because we could be in a macro that actually expects another # (see test) - Refactor & unify error handling in the lexer between ByteStrings and RawByteStrings - Detect potentially intended terminators (longest sequence of "#*" is suggested)
2020-03-28Suggest correct order for args and constraintsEsteban Küber-0/+5
2020-03-28Point at all constraints before argsEsteban Küber-1/+1
2020-03-28Rollup merge of #70418 - PankajChaudhary5:master, r=Dylan-DPCDylan DPC-0/+1
Add long error explanation for E0703 Add long explanation for the E0703 error code Part of #61137 r? @GuillaumeGomez
2020-03-27Move raw string tests into the raw directoryRussell Cohen-0/+0
2020-03-27add the label back but make it shorterMazdak Farrokhzad-1/+1
2020-03-27address some review commentsMazdak Farrokhzad-17/+16
2020-03-27parse: improve recovery for assoc eq constraints.Mazdak Farrokhzad-0/+68
2020-03-27parse: move constraint/arg restriction to ast_validation.Mazdak Farrokhzad-6/+16
2020-03-26Rollup merge of #70428 - Centril:move-to-mod, r=petrochenkovDylan DPC-0/+89
`error_bad_item_kind`: add help text For example, this adds: ``` = help: consider moving the `use` import out to a nearby module scope ``` r? @petrochenkov @estebank Fixes https://github.com/rust-lang/rust/issues/37205.
2020-03-26error_bad_item_kind: add help textMazdak Farrokhzad-0/+89
2020-03-26Rollup merge of #70417 - rakshith-ravi:master, r=CentrilMazdak Farrokhzad-0/+36
parser: recover on `...` as a pattern, suggesting `..` Fixes #70388 My first PR to rust. So please let me know if I'm doing something wrong.
2020-03-26introduce `negative_impls` feature gate and documentNiko Matsakis-4/+5
They used to be covered by `optin_builtin_traits` but negative impls are now applicable to all traits, not just auto traits. This also adds docs in the unstable book for the current state of auto traits.
2020-03-26parse: recover on `const fn()` / `async fn()`.Mazdak Farrokhzad-1/+181
2020-03-26Throw error when encountering `...` instead of `..` while destructing a patternRakshith Ravi-0/+36
Added tests and stderr output
2020-03-26Refactor codePankajChaudhary5-0/+1
2020-03-25Tweak chained operators diagnosticEsteban Küber-95/+96
Use more selective spans Improve suggestion output Be more selective when displaying suggestions Silence some knock-down type errors
2020-03-24pacify missing sysroot spans issueMazdak Farrokhzad-4/+9
2020-03-24expand: address review commentsMazdak Farrokhzad-5/+5
2020-03-24expand: add recovery for parse_ntMazdak Farrokhzad-0/+44
2020-03-24mbe::transcribe: defatalize errors.Mazdak Farrokhzad-4/+13
2020-03-24generic_extension: defatalize Error caseMazdak Farrokhzad-3/+5
2020-03-23Rollup merge of #69942 - estebank:sized-verbose-sugg, r=matthewjasperMazdak Farrokhzad-1/+1
Increase verbosity when suggesting subtle code changes Do not suggest changes that are actually quite small inline, to minimize the likelihood of confusion. Fix #69243.
2020-03-22Normalize wording of privacy access labelsEsteban Küber-1/+1
2020-03-22Rollup merge of #70209 - Centril:recover-quant-closure, r=petrochenkovDylan DPC-0/+26
parser: recover on `for<'a> |...| body` closures When encountering `for` and `<` is 1 token ahead, interpret this as an explicitly quantified generic closure and recover, rather than attempting to parse a `for` loop. This provides both improved diagnostics as well as an insurance policy for the ability to use this as the syntax for generic closures in the future. As requested by r? @eddyb
2020-03-21Add explanation message for E0224Nixon Enraght-Moony-0/+2