From 3fdd84ab3ab664bcc6e56a3ff5853ce7945399e8 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Thu, 16 Nov 2023 13:25:49 +1100 Subject: [PATCH] Allow trailing commas in static suggestions --- src/tools/suggest-tests/src/static_suggestions.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tools/suggest-tests/src/static_suggestions.rs b/src/tools/suggest-tests/src/static_suggestions.rs index a84e78254f2..6e196e626a8 100644 --- a/src/tools/suggest-tests/src/static_suggestions.rs +++ b/src/tools/suggest-tests/src/static_suggestions.rs @@ -2,7 +2,7 @@ use crate::{sug, Suggestion}; // FIXME: perhaps this could use `std::lazy` when it is stablizied macro_rules! static_suggestions { - ($( $glob:expr => [ $( $suggestion:expr ),* ] ),*) => { + ($( $glob:expr => [ $( $suggestion:expr ),* $(,)? ] ),* $(,)? ) => { pub(crate) const STATIC_SUGGESTIONS: ::once_cell::unsync::Lazy)>> = ::once_cell::unsync::Lazy::new(|| vec![ $( ($glob, vec![ $($suggestion),* ]) ),*]); } @@ -10,15 +10,15 @@ macro_rules! static_suggestions { static_suggestions! { "*.md" => [ - sug!("test", 0, ["linkchecker"]) + sug!("test", 0, ["linkchecker"]), ], "compiler/*" => [ sug!("check"), - sug!("test", 1, ["tests/ui", "tests/run-make"]) + sug!("test", 1, ["tests/ui", "tests/run-make"]), ], "src/librustdoc/*" => [ - sug!("test", 1, ["rustdoc"]) - ] + sug!("test", 1, ["rustdoc"]), + ], }