diff options
| author | bors <bors@rust-lang.org> | 2016-02-01 21:22:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-02-01 21:22:59 +0000 |
| commit | b94cd7a5bd488324e39047682e1e4dad9c08fa93 (patch) | |
| tree | 4a9351d73ca37c55b9b73e81aa1aee40974eccb9 /src/libsyntax/parse | |
| parent | 7cae6b59b41d69773a0e02bce5da6d8d4313a9c4 (diff) | |
| parent | 185a0e51bf3d08963440d240862daeb927f113e8 (diff) | |
| download | rust-b94cd7a5bd488324e39047682e1e4dad9c08fa93.tar.gz rust-b94cd7a5bd488324e39047682e1e4dad9c08fa93.zip | |
Auto merge of #31250 - nrc:more-aborts, r=@nikomatsakis
With this PR we can save-analysis on code with errors, essential foundation work for IDE support.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index b8e5642474c..bff5071b8ec 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2483,8 +2483,7 @@ impl<'a> Parser<'a> { float.trunc() as usize, format!(".{}", fstr.splitn(2, ".").last().unwrap()))); } - err.emit(); - self.abort_if_errors(); + return Err(err); } _ => { @@ -4117,9 +4116,7 @@ impl<'a> Parser<'a> { or did you mean the comma-separated arguments \ 'a, Type?"); err.span_note(mk_sp(span_lo, span_hi), &msg); - err.emit(); - - self.abort_if_errors() + return Err(err); } // First parse types. @@ -5189,8 +5186,7 @@ impl<'a> Parser<'a> { of possibly redeclaring it", paths.name)); } - err.emit(); - self.abort_if_errors(); + return Err(err); } match paths.result { |
