diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-01-14 20:31:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-14 20:31:55 +0100 |
| commit | 2f7a226c4dfd8fe71a7451063b6724166b705cf2 (patch) | |
| tree | 379e29c97d1847840c5b054f516d3ea71e85a8da /src/libsyntax/parse/lexer | |
| parent | 816e31b1c608626f1a67387676f85544f3da843d (diff) | |
| parent | 28ea03e11477032a29b30284487d6d73e181ecaf (diff) | |
| download | rust-2f7a226c4dfd8fe71a7451063b6724166b705cf2.tar.gz rust-2f7a226c4dfd8fe71a7451063b6724166b705cf2.zip | |
Rollup merge of #57540 - estebank:eval-more, r=petrochenkov
Modify some parser diagnostics to continue evaluating beyond the parser Continue evaluating further errors after parser errors on: - trailing type argument attribute - lifetime in incorrect location - incorrect binary literal - missing `for` in `impl Trait for Foo` - type argument in `where` clause - incorrect float literal - incorrect `..` in pattern - associated types - incorrect discriminator value variant error and others. All of these were found by making `continue-parse-after-error` `true` by default to identify errors that would need few changes. There are now only a handful of errors that have any change with `continue-parse-after-error` enabled. These changes make it so `rust` _won't_ stop evaluation after finishing parsing, enabling type checking errors to be displayed on the existing code without having to fix the parse errors. Each commit has an individual diagnostic change with their corresponding tests. CC #48724.
Diffstat (limited to 'src/libsyntax/parse/lexer')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index ecb34e43c59..0e1c3b4b61f 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -299,7 +299,7 @@ impl<'a> StringReader<'a> { /// Report a lexical error with a given span. fn err_span(&self, sp: Span, m: &str) { - self.sess.span_diagnostic.span_err(sp, m) + self.sess.span_diagnostic.struct_span_err(sp, m).emit(); } |
