From 5dfb167bf33162f03e11e42f74c8d2befefbb04d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 31 Oct 2019 10:39:38 +0100 Subject: Create new error E0743 --- src/libsyntax/parse/parser/ty.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/parse') 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 { -- cgit 1.4.1-3-g733a5