Skip to content

Commit 0e74022

Browse files
committed
parse_ty_common: .fatal -> .struct_span_err
1 parent 6b92be2 commit 0e74022

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc_parse/parser/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl<'a> Parser<'a> {
133133
}
134134
} else {
135135
let msg = format!("expected type, found {}", self.this_token_descr());
136-
let mut err = self.fatal(&msg);
136+
let mut err = self.struct_span_err(self.token.span, &msg);
137137
err.span_label(self.token.span, "expected type");
138138
self.maybe_annotate_with_ascription(&mut err, true);
139139
return Err(err);

src/test/ui/type/ascription/issue-47666.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LL | let _ = Option:Some(vec![0, 1]);
1111
|
1212
= note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
1313
= note: for more information, see https://github.com/rust-lang/rust/issues/23416
14-
= note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
14+
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
1515

1616
error: aborting due to previous error
1717

0 commit comments

Comments
 (0)