Style consistency: don't end error messages with exclamation points.

This commit is contained in:
Dan Gohman
2018-04-18 10:22:49 -07:00
parent d7e13284b2
commit d122d16f79
3 changed files with 4 additions and 4 deletions

View File

@@ -54,7 +54,7 @@ class TargetISA(object):
self._predicates = dict() # type: Dict[PredKey, PredNode] self._predicates = dict() # type: Dict[PredKey, PredNode]
assert InstructionGroup._current is None,\ assert InstructionGroup._current is None,\
"InstructionGroup {} is still open!"\ "InstructionGroup {} is still open"\
.format(InstructionGroup._current.name) .format(InstructionGroup._current.name)
def __str__(self): def __str__(self):

View File

@@ -231,7 +231,7 @@ class TypeSet(object):
def __hash__(self): def __hash__(self):
# type: () -> int # type: () -> int
h = hash(self.typeset_key()) h = hash(self.typeset_key())
assert h == getattr(self, 'prev_hash', h), "TypeSet changed!" assert h == getattr(self, 'prev_hash', h), "TypeSet changed"
self.prev_hash = h self.prev_hash = h
return h return h

View File

@@ -207,7 +207,7 @@ impl<'a> Verifier<'a> {
); );
} }
if is_last_inst && !is_terminator { if is_last_inst && !is_terminator {
return err!(ebb, "block does not end in a terminator instruction!"); return err!(ebb, "block does not end in a terminator instruction");
} }
// Instructions belong to the correct ebb. // Instructions belong to the correct ebb.
@@ -1163,7 +1163,7 @@ mod tests {
macro_rules! assert_err_with_msg { macro_rules! assert_err_with_msg {
($e:expr, $msg:expr) => { ($e:expr, $msg:expr) => {
match $e { match $e {
Ok(_) => panic!("Expected an error!"), Ok(_) => panic!("Expected an error"),
Err(Error { message, .. }) => { Err(Error { message, .. }) => {
if !message.contains($msg) { if !message.contains($msg) {
panic!(format!( panic!(format!(