mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
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
|
||||
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>)>>
|
||||
= ::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"]),
|
||||
],
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user