File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
branches/try/src/libsyntax/errors Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
3
3
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4
- refs/heads/try: 9d151a71c032b655ca457521730044237c9e130e
4
+ refs/heads/try: db8a9a92b3dafcd5a8d7207096c8cbb90db0b013
5
5
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
6
6
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
7
7
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ use errors::emitter::{Emitter, EmitterWriter};
20
20
use std:: cell:: { RefCell , Cell } ;
21
21
use std:: { error, fmt} ;
22
22
use std:: rc:: Rc ;
23
+ use std:: thread:: panicking;
23
24
use term;
24
25
25
26
pub mod emitter;
@@ -352,7 +353,7 @@ impl<'a> fmt::Debug for DiagnosticBuilder<'a> {
352
353
/// we emit a bug.
353
354
impl < ' a > Drop for DiagnosticBuilder < ' a > {
354
355
fn drop ( & mut self ) {
355
- if !self . cancelled ( ) {
356
+ if !panicking ( ) && ! self . cancelled ( ) {
356
357
self . emitter . borrow_mut ( ) . emit ( & MultiSpan :: new ( ) ,
357
358
"Error constructed but not emitted" ,
358
359
None ,
You can’t perform that action at this time.
0 commit comments