Skip to content

Commit b27b151

Browse files
committed
Anon consts cant appear as repeat expr elements
1 parent 5d0a80b commit b27b151

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
@@ -114,11 +114,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
114114
hir::ExprKind::ConstBlock(..) => return None,
115115
hir::ExprKind::Path(qpath) => {
116116
let res = self.typeck_results.borrow().qpath_res(qpath, element.hir_id);
117-
if let Res::Def(
118-
DefKind::Const | DefKind::AssocConst | DefKind::AnonConst,
119-
_,
120-
) = res
121-
{
117+
if let Res::Def(DefKind::Const | DefKind::AssocConst, _) = res {
122118
return None;
123119
}
124120
}

0 commit comments

Comments
 (0)