about summary refs log tree commit diff
path: root/src/librustc_parse/parser/expr.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-30 14:56:57 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2019-12-31 04:33:34 +0100
commit2091062bf685ec2a64cafdffb72ae8479ff41890 (patch)
tree37291c371ab32228e62b351b43f04fd13e8b474c /src/librustc_parse/parser/expr.rs
parenta9dd56ff9a08d74c53d5cc22d18f126a12749608 (diff)
downloadrust-2091062bf685ec2a64cafdffb72ae8479ff41890.tar.gz
rust-2091062bf685ec2a64cafdffb72ae8479ff41890.zip
parser: call .struct_span_err directly
Diffstat (limited to 'src/librustc_parse/parser/expr.rs')
-rw-r--r--src/librustc_parse/parser/expr.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs
index b51a4465b15..5566407963a 100644
--- a/src/librustc_parse/parser/expr.rs
+++ b/src/librustc_parse/parser/expr.rs
@@ -1915,8 +1915,7 @@ impl<'a> Parser<'a> {
             return;
         }
 
-        self.diagnostic()
-            .struct_span_err(self.token.span, "expected `:`, found `=`")
+        self.struct_span_err(self.token.span, "expected `:`, found `=`")
             .span_suggestion(
                 field_name.span.shrink_to_hi().to(self.token.span),
                 "replace equals symbol with a colon",