mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +00:00
Correctly mark things as min_const_fn
This commit is contained in:
parent
0f0bfc9c22
commit
faa52d1cda
@ -390,10 +390,12 @@ fn check_terminator(
|
||||
cleanup: _,
|
||||
} => check_operand(tcx, cond, span, def_id, body),
|
||||
|
||||
TerminatorKind::FalseUnwind { .. } if !tcx.features().const_loop => {
|
||||
Err((span, "loops are not allowed in const fn".into()))
|
||||
},
|
||||
| TerminatorKind::FalseUnwind { .. }
|
||||
if feature_allowed(tcx, def_id, sym::const_loop)
|
||||
=> Ok(()),
|
||||
|
||||
TerminatorKind::FalseUnwind { .. } => Ok(()),
|
||||
TerminatorKind::FalseUnwind { .. } => {
|
||||
Err((span, "loops are not allowed in const fn".into()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user