| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
This checks `static mut` as well for E0017, and blesses tests now that
we emit an error for a mut deref.
|
|
This error code is never emitted, and the contents of this test are
identical to that of `E0017.rs`.
|
|
|
|
Specific labels when referring to "expected" and "found" types
|
|
|
|
|
|
|
|
|
|
|
|
Remove cannot mutate statics in initializer of another static error
r? @oli-obk
This is just a refactoring. As the removed code itself said, it only a heuristic catching a few cases early instead of leaving it all to const eval. It's easy to work around the static check and then run into the miri-engine check.
|
|
|
|
Tweak non-char/numeric in range pattern diagnostic
Fixes #66283
r? @estebank
|
|
|
|
|
|
|
|
r=nikomatsakis
Stabilize the `re_rebalance_coherence` feature
This PR stabilizes [RFC 2451](https://rust-lang.github.io/rfcs/2451-re-rebalancing-coherence.html), re-rebalance coherence.
Changes include removing the attribute from tests which tested both the old and new behavior, moving the feature to `accepted` and removing the old logic.
I'll also open a [PR](https://github.com/rust-lang-nursery/reference/pull/703) against the reference, updating it with the content of the RFC.
Closes #63599
r? @nikomatsakis
|
|
|
|
|
|
Improve the "try using a variant of the expected type" hint.
Fix https://github.com/rust-lang/rust/issues/65494.
- Change type-printing output.
- Use `span_to_snippet` when possible.
- Change the message to `try using a variant of the expected enum`
|
|
Call out the types that are non local on E0117
CC #24745.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Point at the span for the definition of ADTs internal to the current
crate.
Look at the leading char of the ident to determine whether we're
expecting a likely fn or any of a fn, a tuple struct or a tuple variant.
Turn fn `add_typo_suggestion` into a `Resolver` method.
|
|
Make the spacing between the code snippet and verbose structured
suggestions consistent with note and help messages.
|
|
|
|
|
|
Bring attention to suggestions when the only difference is capitalization
CC #65386.
|
|
Print lifetimes with backticks
Fixes #65287
r? @varkor
|
|
|
|
Suggest `if let` on `let` refutable binding
Fix #58385.
|
|
|
|
|
|
|
|
See #64931.
|
|
Reword E0392 slightly
Make it clearer that a type or lifetime argument not being used can be
fixed by referencing it in a struct's fields, not just using `PhathomData`.
CC #53589.
|
|
|
|
Make it clearer that a type or lifetime argument not being used can be
fixed by referencing it in a struct's fields, not just using `PhathomData`.
|
|
Point at definition when misusing ADT
When given `struct Foo(usize)` and using it as `Foo {}` or `Foo`, point at `Foo`'s definition in the error.
|
|
Remove redundancy from the implementation of C variadics.
This cleanup was first described in https://github.com/rust-lang/rust/issues/44930#issuecomment-497163539:
* AST doesn't track `c_variadic: bool` anymore, relying solely on a trailing `CVarArgs` type in fn signatures
* HIR doesn't have a `CVarArgs` anymore, relying solely on `c_variadic: bool`
* same for `ty::FnSig` (see tests for diagnostics improvements from that)
* `{hir,mir}::Body` have one extra argument than the signature when `c_variadic == true`
* `rustc_typeck` and `rustc_mir::{build,borrowck}` need to give that argument the right type (which no longer uses a lifetime parameter, but a function-internal scope)
* `rustc_target::abi::call` doesn't need special hacks anymore (since it never sees the `VaListImpl` now, it's all inside the body)
r? @nagisa / @rkruppe cc @dlrobertson @oli-obk
|
|
|
|
Where possible, the error message includes the name of the crate
that brought in the crate with duplicate lang items (which
helps with debugging). This information is passed on from cstore
using the `extern_crate` query.
|
|
r=cramertj
Remove blanket silencing of "type annotation needed" errors
Remove blanket check for existence of other errors before emitting "type annotation needed" errors, and add some eager checks to avoid adding obligations when they refer to types that reference `[type error]` in order to reduce unneeded errors.
Fix #64084.
|
|
|
|
Remove blanket check for existence of other errors before emitting
"type annotation needed" errors, and add some eager checks to avoid
adding obligations when they refer to types that reference
`[type error]` in order to reduce unneded errors.
|