| Age | Commit message (Collapse) | Author | Lines |
|
|
|
One or two tests became build-pass without the FIXME because they really
needed build-pass (were failing without it).
Helps with #62277
|
|
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
```
|
|
|
|
|
|
|
|
Tweak output of type params and constraints in the wrong order
r? @Centril @varkor
|
|
|
|
|
|
|
|
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
|
|
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
|
|
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
|
|
|
|
|
|
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.
|
|
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
|
|
parse_and_disallow_postfix_after_cast: account for `ExprKind::Err`.
Fixes https://github.com/rust-lang/rust/issues/70552.
r? @estebank
cc @daboross
|
|
|
|
|
|
|
|
When encountering constraints before type arguments or lifetimes,
suggest the correct order.
|
|
|
|
|
|
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)
|
|
|
|
|
|
Add long error explanation for E0703
Add long explanation for the E0703 error code
Part of #61137
r? @GuillaumeGomez
|
|
|
|
|
|
|
|
|
|
|
|
`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.
|
|
|
|
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.
|
|
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.
|
|
|
|
Added tests and stderr output
|
|
|
|
Use more selective spans
Improve suggestion output
Be more selective when displaying suggestions
Silence some knock-down type errors
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
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
|
|
|