1
Fork 0

Rollup merge of #135000 - compiler-errors:opaque-captures-dupe, r=lqd

Fix ICE when opaque captures a duplicated/invalid lifetime

See description on test.

Fixes #132766
Fixes #133693
Fixes #134780
This commit is contained in:
Matthias Krüger 2025-01-01 22:04:18 +01:00 committed by GitHub
commit 92dbfcc2c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 53 additions and 27 deletions

View file

@ -2007,7 +2007,10 @@ fn check_variances_for_type_defn<'tcx>(
}
match hir_param.name {
hir::ParamName::Error => {}
hir::ParamName::Error(_) => {
// Don't report a bivariance error for a lifetime that isn't
// even valid to name.
}
_ => {
let has_explicit_bounds = explicitly_bounded_params.contains(&parameter);
report_bivariance(tcx, hir_param, has_explicit_bounds, item);