about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBoxy <rust@boxyuwu.dev>2025-04-14 13:38:37 +0100
committerBoxy <rust@boxyuwu.dev>2025-05-21 20:38:49 +0100
commit43162597292f904ff5ff47e251ba40fb9ae41ded (patch)
treea91190c60e44fb59792f79e19975f478136e0748
parent508a9f085393a1e348725ca7f169780c65dbc212 (diff)
downloadrust-43162597292f904ff5ff47e251ba40fb9ae41ded.tar.gz
rust-43162597292f904ff5ff47e251ba40fb9ae41ded.zip
Anon consts cant appear as repeat expr elements
-rw-r--r--compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
index dc6a9dc93d0..124b6e80fd4 100644
--- a/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
+++ b/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
@@ -114,11 +114,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                     hir::ExprKind::ConstBlock(..) => return None,
                     hir::ExprKind::Path(qpath) => {
                         let res = self.typeck_results.borrow().qpath_res(qpath, element.hir_id);
-                        if let Res::Def(
-                            DefKind::Const | DefKind::AssocConst | DefKind::AnonConst,
-                            _,
-                        ) = res
-                        {
+                        if let Res::Def(DefKind::Const | DefKind::AssocConst, _) = res {
                             return None;
                         }
                     }