about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser/ty.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-10-31 10:39:38 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-10-31 10:39:38 +0100
commit5dfb167bf33162f03e11e42f74c8d2befefbb04d (patch)
treeae8795826c6c7804d3648887a5df9d031fddd0af /src/libsyntax/parse/parser/ty.rs
parent0b7e28a1610924a27471ffdb59a2885709b3b415 (diff)
downloadrust-5dfb167bf33162f03e11e42f74c8d2befefbb04d.tar.gz
rust-5dfb167bf33162f03e11e42f74c8d2befefbb04d.zip
Create new error E0743
Diffstat (limited to 'src/libsyntax/parse/parser/ty.rs')
-rw-r--r--src/libsyntax/parse/parser/ty.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser/ty.rs b/src/libsyntax/parse/parser/ty.rs
index 86c94b680b2..e8f718a2483 100644
--- a/src/libsyntax/parse/parser/ty.rs
+++ b/src/libsyntax/parse/parser/ty.rs
@@ -197,8 +197,11 @@ impl<'a> Parser<'a> {
                 self.eat(&token::DotDotDot);
                 TyKind::CVarArgs
             } else {
-                return Err(self.fatal(
-                    "only foreign functions are allowed to be C-variadic"
+                return Err(struct_span_fatal!(
+                    self.sess.span_diagnostic,
+                    self.token.span,
+                    E0743,
+                    "only foreign functions are allowed to be C-variadic",
                 ));
             }
         } else {