Skip to content

Commit e71b496

Browse files
committed
Anon consts cant appear as repeat expr elements
1 parent 99c0909 commit e71b496

File tree

1 file changed

+1
-5
lines changed
  • compiler/rustc_hir_typeck/src/fn_ctxt

1 file changed

+1
-5
lines changed

compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
121121
hir::ExprKind::ConstBlock(..) => return None,
122122
hir::ExprKind::Path(qpath) => {
123123
let res = self.typeck_results.borrow().qpath_res(qpath, element.hir_id);
124-
if let Res::Def(
125-
DefKind::Const | DefKind::AssocConst | DefKind::AnonConst,
126-
_,
127-
) = res
128-
{
124+
if let Res::Def(DefKind::Const | DefKind::AssocConst, _) = res {
129125
return None;
130126
}
131127
}

0 commit comments

Comments
 (0)