Fix forward!
so it doesn't require trailing commas in some cases.
This commit is contained in:
parent
caefa55347
commit
b4a6239984
@ -207,11 +207,11 @@ macro_rules! forward {
|
|||||||
// Forward pattern for &mut self -> &mut Self
|
// Forward pattern for &mut self -> &mut Self
|
||||||
(
|
(
|
||||||
$(#[$attrs:meta])*
|
$(#[$attrs:meta])*
|
||||||
pub fn $n:ident(&mut self, $($name:ident: $ty:ty),* $(,)?) -> &mut Self
|
pub fn $n:ident(&mut self $(, $name:ident: $ty:ty)* $(,)?) -> &mut Self
|
||||||
) => {
|
) => {
|
||||||
$(#[$attrs])*
|
$(#[$attrs])*
|
||||||
#[doc = concat!("See [`Diagnostic::", stringify!($n), "()`].")]
|
#[doc = concat!("See [`Diagnostic::", stringify!($n), "()`].")]
|
||||||
pub fn $n(&mut self, $($name: $ty),*) -> &mut Self {
|
pub fn $n(&mut self $(, $name: $ty)*) -> &mut Self {
|
||||||
self.diagnostic.$n($($name),*);
|
self.diagnostic.$n($($name),*);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
@ -407,8 +407,8 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
|
|||||||
sp: impl Into<MultiSpan>,
|
sp: impl Into<MultiSpan>,
|
||||||
msg: impl Into<SubdiagnosticMessage>,
|
msg: impl Into<SubdiagnosticMessage>,
|
||||||
) -> &mut Self);
|
) -> &mut Self);
|
||||||
forward!(pub fn is_lint(&mut self,) -> &mut Self);
|
forward!(pub fn is_lint(&mut self) -> &mut Self);
|
||||||
forward!(pub fn disable_suggestions(&mut self,) -> &mut Self);
|
forward!(pub fn disable_suggestions(&mut self) -> &mut Self);
|
||||||
forward!(pub fn multipart_suggestion(
|
forward!(pub fn multipart_suggestion(
|
||||||
&mut self,
|
&mut self,
|
||||||
msg: impl Into<SubdiagnosticMessage>,
|
msg: impl Into<SubdiagnosticMessage>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user