Fix some warnings on nightly Rust (#3148)

Looks like these trailing-semicolons-in-macros are likely to become a
hard error in the future, so this updates to remove them as necessary.
This commit is contained in:
Alex Crichton
2021-08-05 13:02:44 -05:00
committed by GitHub
parent 4cfa031c5f
commit 9e142f8792
3 changed files with 6 additions and 6 deletions

View File

@@ -19,19 +19,19 @@ static SHIFTWIDTH: usize = 4;
/// strings. /// strings.
macro_rules! fmtln { macro_rules! fmtln {
($fmt:ident, $fmtstring:expr, $($fmtargs:expr),*) => { ($fmt:ident, $fmtstring:expr, $($fmtargs:expr),*) => {
$fmt.line(format!($fmtstring, $($fmtargs),*)); $fmt.line(format!($fmtstring, $($fmtargs),*))
}; };
($fmt:ident, $arg:expr) => { ($fmt:ident, $arg:expr) => {
$fmt.line($arg); $fmt.line($arg)
}; };
($_:tt, $($args:expr),+) => { ($_:tt, $($args:expr),+) => {
compile_error!("This macro requires at least two arguments: the Formatter instance and a format string."); compile_error!("This macro requires at least two arguments: the Formatter instance and a format string.")
}; };
($_:tt) => { ($_:tt) => {
compile_error!("This macro requires at least two arguments: the Formatter instance and a format string."); compile_error!("This macro requires at least two arguments: the Formatter instance and a format string.")
}; };
} }

View File

@@ -556,7 +556,7 @@ impl WorkerThread {
vec.push(CacheEntry::Unrecognized { vec.push(CacheEntry::Unrecognized {
path: $path.to_path_buf(), path: $path.to_path_buf(),
is_dir: $is_dir, is_dir: $is_dir,
}); })
}; };
} }
macro_rules! add_unrecognized_and { macro_rules! add_unrecognized_and {

View File

@@ -386,7 +386,7 @@ impl CompiledExpression {
} }
} else { } else {
return Ok(None); return Ok(None);
}; }
}; };
} }
for part in &self.parts { for part in &self.parts {