about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-06-16 22:07:23 -0400
committerMichael Goulet <michael@errs.io>2024-06-17 22:35:25 -0400
commit227374714f3429e401c2c572a7eba00a4423ae09 (patch)
treecbc680fe64f6c2e86ae3f0f740a7410e7dc0b40f /compiler/rustc_ast_lowering/src
parent579bc3c0e8adb3418d41246d937ddd63e0a0cfcf (diff)
downloadrust-227374714f3429e401c2c572a7eba00a4423ae09.tar.gz
rust-227374714f3429e401c2c572a7eba00a4423ae09.zip
Delay a bug and mark precise_capturing as not incomplete
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
-rw-r--r--compiler/rustc_ast_lowering/src/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index b998912bf6d..f18ceb62e0b 100644
--- a/compiler/rustc_ast_lowering/src/lib.rs
+++ b/compiler/rustc_ast_lowering/src/lib.rs
@@ -1385,7 +1385,11 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
                                 None
                             }
                             // Ignore `use` syntax since that is not valid in objects.
-                            GenericBound::Use(..) => None,
+                            GenericBound::Use(_, span) => {
+                                this.dcx()
+                                    .span_delayed_bug(*span, "use<> not allowed in dyn types");
+                                None
+                            }
                         }));
                     let lifetime_bound =
                         lifetime_bound.unwrap_or_else(|| this.elided_dyn_bound(t.span));