diff options
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); |
