Skip to content

Commit 3fdd84a

Browse files
committed
Allow trailing commas in static suggestions
1 parent 9144d51 commit 3fdd84a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/tools/suggest-tests/src/static_suggestions.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ use crate::{sug, Suggestion};
22

33
// FIXME: perhaps this could use `std::lazy` when it is stablizied
44
macro_rules! static_suggestions {
5-
($( $glob:expr => [ $( $suggestion:expr ),* ] ),*) => {
5+
($( $glob:expr => [ $( $suggestion:expr ),* $(,)? ] ),* $(,)? ) => {
66
pub(crate) const STATIC_SUGGESTIONS: ::once_cell::unsync::Lazy<Vec<(&'static str, Vec<Suggestion>)>>
77
= ::once_cell::unsync::Lazy::new(|| vec![ $( ($glob, vec![ $($suggestion),* ]) ),*]);
88
}
99
}
1010

1111
static_suggestions! {
1212
"*.md" => [
13-
sug!("test", 0, ["linkchecker"])
13+
sug!("test", 0, ["linkchecker"]),
1414
],
1515

1616
"compiler/*" => [
1717
sug!("check"),
18-
sug!("test", 1, ["tests/ui", "tests/run-make"])
18+
sug!("test", 1, ["tests/ui", "tests/run-make"]),
1919
],
2020

2121
"src/librustdoc/*" => [
22-
sug!("test", 1, ["rustdoc"])
23-
]
22+
sug!("test", 1, ["rustdoc"]),
23+
],
2424
}

0 commit comments

Comments
 (0)