Skip possible where_clause_object_safety lints when checking `multiple_supertrait_upcastable`
Fix#106247
To achieve this, I lifted the `WhereClauseReferencesSelf` out from `object_safety_violations` and move it into `is_object_safe` (which is changed to a new query).
cc `@dtolnay`
r? `@compiler-errors`
Detect references to non-existant messages in Fluent resources
Should help with cases like #107091, where `{variable}` (a message reference) is accidentally typed, rather than `{$variable}` (a variable reference)
Fixes#107370
```@rustbot``` label +A-translation
Migrate mir_build's borrow conflicts
This also changes the error message slightly, for two reasons:
- I'm not a fan of saying "value borrowed, by `x`, here"
- it simplifies the error implementation significantly.
Adds an additional hint to failures where we encounter an else keyword
while we're parsing an if-let block.
This is likely that the user has accidentally mixed if-let and let...else
together.
suggestion for attempted integer identifier in patterns
Fixes#106552
Implemented a suggestion on `E0005` that occurs when no bindings are present and the pattern is a literal integer.
Warn when using panic-strategy abort for proc-macro crates
See https://github.com/rust-lang/rust/issues/82320, this simply warns for now as that seems like the best step that can be immediately taken (opposed to straight up rejecting or ignoring)
Migrate `rustc_lint` lint diagnostics
Part 2 of [Migrate `rustc_lint` errors to `SessionDiagnostic`](https://github.com/rust-lang/rust/pull/100776)
r? `@davidtwco`
# TODO
- [x] Refactor some lints manually implementing `DecorateLint` to use `Option<Subdiagnostic>`.
- [x] Add `#[rustc_lint_diagnostics]` to lint functions in `context.rs`.
- [x] Migrate `hidden_unicode_codepoints.rs`.
- [x] Migrate `UnsafeCode` in `builtin.rs`.
- [x] Migrate the rest of `builtin.rs`.
remove unreachable error code `E0490`
AFAIK, the untested and undocumented error code `E0490` is now unreachable, it was from the days of the original borrow checker.
cc ``@GuillaumeGomez`` #61137
Move autoderef to `rustc_hir_analysis`
Not sure if this is a change we actually want, but autoderef really is only (functionally) used by `rustc_hir_analysis` and `rustc_hir_typeck`, so it probably should live there.
Instead, implement a separate autoderef helper in `TypeErrCtxt` for the one use-case that goes against the ordering of the crate graph..
Migrate mir_build diagnostics 2 of 3
The first three commits are fairly boring, however I've made some changes to the output of the match checking diagnostics.
Recover from where clauses placed before tuple struct bodies
Open to any suggestions regarding the phrasing of the diagnostic.
Fixes#100790.
`@rustbot` label A-diagnostics
r? diagnostics