Add loop head span to hir
This commit is contained in:
parent
a701ff981d
commit
060dba67b7
15 changed files with 35 additions and 25 deletions
|
@ -199,7 +199,7 @@ impl<'tcx> Visitor<'tcx> for CheckConstVisitor<'tcx> {
|
|||
// Skip the following checks if we are not currently in a const context.
|
||||
_ if self.const_kind.is_none() => {}
|
||||
|
||||
hir::ExprKind::Loop(_, _, source) => {
|
||||
hir::ExprKind::Loop(_, _, source, _) => {
|
||||
self.const_check_violated(NonConstExpr::Loop(*source), e.span);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue