about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-01-01 21:37:33 +0000
committerbors <bors@rust-lang.org>2025-01-01 21:37:33 +0000
commit62b13a9019a8b0a7a41039eb66bb44dc66b938c3 (patch)
treeb43b3cabaea2ece4402a5088add019113b05a520 /compiler/rustc_hir_analysis/src
parent45d11e51bb66c2deb63a006fe3953c4b6fbc50c2 (diff)
parent92dbfcc2c0250a75e5c9f41cfc83738946f6e791 (diff)
downloadrust-62b13a9019a8b0a7a41039eb66bb44dc66b938c3.tar.gz
rust-62b13a9019a8b0a7a41039eb66bb44dc66b938c3.zip
Auto merge of #135005 - matthiaskrgr:rollup-5ubuitt, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #134967 (handle submodules automatically on `doc` steps)
 - #134973 (Fix typos)
 - #134984 (`ObligationCause` construction tweaks in typeck)
 - #134985 (Remove qualification of `std::cmp::Ordering` in `Ord` doc)
 - #135000 (Fix ICE when opaque captures a duplicated/invalid lifetime)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
-rw-r--r--compiler/rustc_hir_analysis/src/check/wfcheck.rs5
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(&parameter);
                 report_bivariance(tcx, hir_param, has_explicit_bounds, item);