about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-22 03:31:16 +0000
committerbors <bors@rust-lang.org>2024-07-22 03:31:16 +0000
commitee0fd6caf770e8b3baa403b4da3ef0c7e274dc21 (patch)
tree51ba530f78f3619f36a9fc858102ef074270302b /compiler/rustc_hir_analysis/src
parent0f8534e79e4cfbda7421017047d1f5021235b0ac (diff)
parentfdef1d959202b3269430fff1ac0b5e9dde746b3d (diff)
downloadrust-ee0fd6caf770e8b3baa403b4da3ef0c7e274dc21.tar.gz
rust-ee0fd6caf770e8b3baa403b4da3ef0c7e274dc21.zip
Auto merge of #128048 - workingjubilee:rollup-gehtjxd, r=workingjubilee
Rollup of 6 pull requests

Successful merges:

 - #127583 (Deal with invalid UTF-8 from `gai_strerror`)
 - #128014 (Fix stab display in doc blocks)
 - #128020 (Just totally fully deny late-bound consts)
 - #128023 (rustdoc: short descriptions cause word-breaks in tables)
 - #128033 (Explain why we require `_` for empty patterns)
 - #128038 (Don't output incremental test artifacts into working directory)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
-rw-r--r--compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs
index 7930f54038d..349dc9ad00e 100644
--- a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs
+++ b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs
@@ -2094,11 +2094,7 @@ pub fn deny_non_region_late_bound(
             format!("late-bound {what} parameter not allowed on {where_}"),
         );
 
-        let guar = if tcx.features().non_lifetime_binders && first {
-            diag.emit()
-        } else {
-            diag.delay_as_bug()
-        };
+        let guar = diag.emit_unless(!tcx.features().non_lifetime_binders || !first);
 
         first = false;
         *arg = ResolvedArg::Error(guar);