| Age | Commit message (Collapse) | Author | Lines |
|
Stemming from the thread at https://twitter.com/indygreg/status/1223279056398929920
|
|
Make #47990 easier to understand
|
|
|
|
|
|
|
|
|
|
when they don't
|
|
bindings_after_at: harden tests
|
|
|
|
|
|
|
|
Remove incorrect debug assertions from catch_unwind
Previously the debug assertions in the implementation of catch_unwind
used to verify consistency of the panic count by checking that the count
is zero just before leaving the function. This incorrectly assumed that
no panic was in progress when entering `catch_unwind`.
Fixes #68696.
|
|
Address inconsistency in using "is" with "declared here"
"is" was generally used for NLL diagnostics, but not other diagnostics. Using "is" makes the diagnostics sound more natural and readable, so it seems sensible to commit to them throughout.
r? @Centril
|
|
Previously the debug assertions in the implementation of catch_unwind
used to verify consistency of the panic count by checking that the count
is zero just before leaving the function. This incorrectly assumed that
no panic was in progress when entering `catch_unwind`.
|
|
r=LukasKalbertodt
Move numeric consts to associated consts step1
A subset of #67913. Implements the first step of RFC https://github.com/rust-lang/rfcs/pull/2700
This PR adds the new constants as unstable constants and defines the old ones in terms of the new ones. Then fix a tiny bit of code that started having naming collisions because of the new assoc consts.
Removed a test that did not seem relevant any longer. Since doing just `u8::MIN` should now indeed be valid.
|
|
|
|
Fix spelling errors
|
|
|
|
Suggest defining type parameter when appropriate
```
error[E0412]: cannot find type `T` in this scope
--> file.rs:3:12
|
3 | impl Trait<T> for Struct {}
| - ^ not found in this scope
| |
| help: you might be missing a type parameter: `<T>`
```
Fix #64298.
|
|
```
error[E0412]: cannot find type `T` in this scope
--> file.rs:3:12
|
3 | impl Trait<T> for Struct {}
| - ^ not found in this scope
| |
| help: you might be missing a type parameter: `<T>`
```
Fix #64298.
|
|
|
|
|
|
Adds a small Rust regression test for #66308.
r? @alexcrichton
|
|
|
|
|
|
|
|
adding one
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #67956 (Detail transitive containment in E0588 diagnostic)
- #68153 (resolve: Point at the private item definitions in privacy errors)
- #68195 (Account for common `impl Trait`/`dyn Trait` return type errors)
- #68288 (Fix some of the rustfmt fallout in Miri)
- #68292 (don't clone types that are copy)
- #68301 (Don't propagate __RUST_TEST_INVOKE to subprocess)
Failed merges:
r? @ghost
|
|
Account for common `impl Trait`/`dyn Trait` return type errors
- When all return paths have the same type, suggest `impl Trait`.
- When all return paths implement the expected `trait`, suggest `Box<dyn Trait>` and mention using an `enum`.
- When multiple different types are returned and `impl Trait` is expected, extend the explanation.
- When return type is `impl Trait` and the return paths do not implement `Trait`, point at the returned values.
- Split `src/librustc/traits/error_reporting.rs` into multiple files to keep size under control.
Fix #68110, cc #66523.
|
|
Handle recursive instantiation of drop shims
The compiler used to hang because the recursion limit was never hit.
|
|
|
|
|
|
|
|
|
|
Clean up some diagnostics by making them more consistent
In general:
- Diagnostic should start with a lowercase letter.
- Diagnostics should not end with a full stop.
- Ellipses contain three dots.
- Backticks should encode Rust code.
I also reworded a couple of messages to make them read more clearly.
It might be sensible to create a style guide for diagnostics, so these informal conventions are written down somewhere, after which we could audit the existing diagnostics.
r? @Centril
|
|
|
|
|
|
|
|
Rename Result::as_deref_ok to as_deref
Addresses https://github.com/rust-lang/rust/issues/50264#issuecomment-533952247
r? @dtolnay
|
|
Point at the span for the definition of crate foreign ADTs
Follow up to #65421. Partially addresses #65386. Blocked on #53081.
|
|
|
|
Fix issue with using `self` module via indirection
Fixes https://github.com/rust-lang/rust/issues/68103.
|
|
Do not ICE on unicode next point
Use `shrink_to_hi` instead of `next_point` and fix `next_point`.
Fix #68000, fix #68091, fix #68092.
|
|
Clarify suggestion for E0013
Fixes https://github.com/rust-lang/rust/issues/68038.
|
|
|
|
Unify output of "variant not found" errors
Fix #49566.
|
|
|
|
|
|
|