about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-03-05 17:11:46 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-03-12 09:34:21 +1100
commit763db5dcd9b95179915e13533af280ad5f6db403 (patch)
tree742f77d37e9af5f8ce48f0001eb022689b875900
parent6650252439d4e03368b305c42a10006e36f1545e (diff)
downloadrust-763db5dcd9b95179915e13533af280ad5f6db403.tar.gz
rust-763db5dcd9b95179915e13533af280ad5f6db403.zip
Convert a delayed bug to a bug.
This is never hit in the test suite.

At some point the check should be removed entirely. There are a million
places in the compiler where an empty symbol doesn't make sense, so a
check of this nature has almost zero value. But I'll leave it in place
for now just in case it gets hit by fuzzing or in the wild.
-rw-r--r--compiler/rustc_hir_typeck/src/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir_typeck/src/expr.rs b/compiler/rustc_hir_typeck/src/expr.rs
index 786e8b876a6..7e4026db738 100644
--- a/compiler/rustc_hir_typeck/src/expr.rs
+++ b/compiler/rustc_hir_typeck/src/expr.rs
@@ -2933,7 +2933,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
         }
 
         let guar = if field.name == kw::Empty {
-            self.dcx().span_delayed_bug(field.span, "field name with no name")
+            self.dcx().span_bug(field.span, "field name with no name")
         } else if self.method_exists_for_diagnostic(
             field,
             base_ty,