Fix a number of warnings on nightly Rust (#2652)

This fixes some issues that are cropping up where some syntax will get
phased out in 2021
This commit is contained in:
Alex Crichton
2021-02-11 12:42:45 -06:00
committed by GitHub
parent 9abae356e0
commit 09b976e1d5
9 changed files with 37 additions and 37 deletions

View File

@@ -296,7 +296,8 @@ impl Var {
pub fn set_def(&mut self, position: PatternPosition, def: DefIndex) {
assert!(
self.get_def(position).is_none(),
format!("redefinition of variable {}", self.name)
"redefinition of variable {}",
self.name
);
match position {
PatternPosition::Source => {
@@ -461,7 +462,8 @@ impl Apply {
// Basic check on number of arguments.
assert!(
inst.operands_in.len() == args.len(),
format!("incorrect number of arguments in instruction {}", inst.name)
"incorrect number of arguments in instruction {}",
inst.name
);
// Check that the kinds of Literals arguments match the expected operand.