about summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
authorTaiki Endo <te316e89@gmail.com>2019-02-24 21:59:44 +0900
committerTaiki Endo <te316e89@gmail.com>2019-02-24 21:59:44 +0900
commit871910a2c6e8624d4ebaa08ce6201b661f8c25f3 (patch)
tree2ef275486d364b995d3ceda154a176a9f5e422f5 /src/librustc_errors
parent7f19f161f24c9a02ff8c3f73122d0b015039221f (diff)
downloadrust-871910a2c6e8624d4ebaa08ce6201b661f8c25f3.tar.gz
rust-871910a2c6e8624d4ebaa08ce6201b661f8c25f3.zip
Use ? in some macros
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/diagnostic_builder.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_errors/diagnostic_builder.rs b/src/librustc_errors/diagnostic_builder.rs
index 8a30790174d..0c808a07f9b 100644
--- a/src/librustc_errors/diagnostic_builder.rs
+++ b/src/librustc_errors/diagnostic_builder.rs
@@ -36,7 +36,7 @@ macro_rules! forward {
     // Forward pattern for &self -> &Self
     (
         $(#[$attrs:meta])*
-        pub fn $n:ident(&self, $($name:ident: $ty:ty),* $(,)*) -> &Self
+        pub fn $n:ident(&self, $($name:ident: $ty:ty),* $(,)?) -> &Self
     ) => {
         $(#[$attrs])*
         pub fn $n(&self, $($name: $ty),*) -> &Self {
@@ -48,7 +48,7 @@ macro_rules! forward {
     // Forward pattern for &mut self -> &mut Self
     (
         $(#[$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])*
         pub fn $n(&mut self, $($name: $ty),*) -> &mut Self {
@@ -64,7 +64,7 @@ macro_rules! forward {
         pub fn $n:ident<S: Into<MultiSpan>>(
             &mut self,
             $($name:ident: $ty:ty),*
-            $(,)*
+            $(,)?
         ) -> &mut Self
     ) => {
         $(#[$attrs])*