Allow errors to abort const checking when emitted

This is a hack for parity with `qualify_min_const_fn`, which only
emitted a single error.
This commit is contained in:
Dylan MacKenzie
2020-09-17 11:09:52 -07:00
parent 7fb9587a3c
commit bfc10a89c3
2 changed files with 22 additions and 4 deletions

View File

@@ -62,6 +62,8 @@ pub enum Status {
/// An operation that is not *always* allowed in a const context.
pub trait NonConstOp: std::fmt::Debug {
const STOPS_CONST_CHECKING: bool = false;
/// Returns an enum indicating whether this operation is allowed within the given item.
fn status_in_item(&self, _ccx: &ConstCx<'_, '_>) -> Status {
Status::Forbidden