Allow trailing commas in static suggestions
This commit is contained in:
parent
9144d51175
commit
3fdd84ab3a
@ -2,7 +2,7 @@ use crate::{sug, Suggestion};
|
|||||||
|
|
||||||
// FIXME: perhaps this could use `std::lazy` when it is stablizied
|
// FIXME: perhaps this could use `std::lazy` when it is stablizied
|
||||||
macro_rules! static_suggestions {
|
macro_rules! static_suggestions {
|
||||||
($( $glob:expr => [ $( $suggestion:expr ),* ] ),*) => {
|
($( $glob:expr => [ $( $suggestion:expr ),* $(,)? ] ),* $(,)? ) => {
|
||||||
pub(crate) const STATIC_SUGGESTIONS: ::once_cell::unsync::Lazy<Vec<(&'static str, Vec<Suggestion>)>>
|
pub(crate) const STATIC_SUGGESTIONS: ::once_cell::unsync::Lazy<Vec<(&'static str, Vec<Suggestion>)>>
|
||||||
= ::once_cell::unsync::Lazy::new(|| vec![ $( ($glob, vec![ $($suggestion),* ]) ),*]);
|
= ::once_cell::unsync::Lazy::new(|| vec![ $( ($glob, vec![ $($suggestion),* ]) ),*]);
|
||||||
}
|
}
|
||||||
@ -10,15 +10,15 @@ macro_rules! static_suggestions {
|
|||||||
|
|
||||||
static_suggestions! {
|
static_suggestions! {
|
||||||
"*.md" => [
|
"*.md" => [
|
||||||
sug!("test", 0, ["linkchecker"])
|
sug!("test", 0, ["linkchecker"]),
|
||||||
],
|
],
|
||||||
|
|
||||||
"compiler/*" => [
|
"compiler/*" => [
|
||||||
sug!("check"),
|
sug!("check"),
|
||||||
sug!("test", 1, ["tests/ui", "tests/run-make"])
|
sug!("test", 1, ["tests/ui", "tests/run-make"]),
|
||||||
],
|
],
|
||||||
|
|
||||||
"src/librustdoc/*" => [
|
"src/librustdoc/*" => [
|
||||||
sug!("test", 1, ["rustdoc"])
|
sug!("test", 1, ["rustdoc"]),
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user