diff options
| author | Michael Goulet <michael@errs.io> | 2025-01-01 16:55:10 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-01-01 19:32:51 +0000 |
| commit | d3c60672755fd7c5bfaabaac3af88961712a2b9a (patch) | |
| tree | 0fce40e41c6535da24075c4657d9026d585fe993 /compiler/rustc_hir_analysis/src | |
| parent | 7f75bfa1ad4e9a9d33a179a90603001515e91991 (diff) | |
| download | rust-d3c60672755fd7c5bfaabaac3af88961712a2b9a.tar.gz rust-d3c60672755fd7c5bfaabaac3af88961712a2b9a.zip | |
Fix ICE when opaque captures a duplicated/invalid lifetime
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/wfcheck.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index 3cddc9642ba..efffb24c81d 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -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(¶meter); report_bivariance(tcx, hir_param, has_explicit_bounds, item); |
