]> git.lizzy.rs Git - rust.git/commitdiff
parse_ty_common: .fatal -> .struct_span_err
authorMazdak Farrokhzad <twingoow@gmail.com>
Sun, 8 Dec 2019 08:08:19 +0000 (09:08 +0100)
committerMazdak Farrokhzad <twingoow@gmail.com>
Sat, 21 Dec 2019 18:20:41 +0000 (19:20 +0100)
src/librustc_parse/parser/ty.rs
src/test/ui/type/ascription/issue-47666.stderr

index 840461d75be0190853e7cf7f25135e7d7204baef..d9938a81240dce6a9960c487f4c58827eafe345e 100644 (file)
@@ -133,7 +133,7 @@ fn parse_ty_common(
             }
         } else {
             let msg = format!("expected type, found {}", self.this_token_descr());
-            let mut err = self.fatal(&msg);
+            let mut err = self.struct_span_err(self.token.span, &msg);
             err.span_label(self.token.span, "expected type");
             self.maybe_annotate_with_ascription(&mut err, true);
             return Err(err);
index 2f052341faead87e832f4591e779b231ec92c646..648635f0c32fa34eea905318354ddb977136b4f9 100644 (file)
@@ -11,7 +11,7 @@ LL |     let _ = Option:Some(vec![0, 1]);
    |
    = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
    = note: for more information, see https://github.com/rust-lang/rust/issues/23416
-   = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
+   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error: aborting due to previous error