Rollup merge of #133233 - estebank:const-errors, r=Nadrieril

Add context to "const in pattern" errors

*Each commit addresses specific diagnostics.*

- Add primary span labels
- Point at `const` item, and `const` generic param definition
- Reword messages and notes
- Point at generic param through which an associated `const` is being referenced
- Silence const in pattern with evaluation errors when they come from `const` items that already emit a diagnostic
- On non-structural type in const used as pattern, point at the type that should derive `PartialEq`
This commit is contained in:
León Orell Valerian Liehr 2024-12-05 07:29:54 +01:00 committed by GitHub
commit 626db06409
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
88 changed files with 1123 additions and 517 deletions

View file

@ -18,7 +18,6 @@ const ALLOWLIST: &[&str] = &[
"const_eval_validation_failure_note",
"driver_impl_ice",
"incremental_corrupt_file",
"mir_build_pointer_pattern",
];
fn check_period(filename: &str, contents: &str, bad: &mut bool) {