Skip to content

Commit 1601754

Browse files
committed
---
yaml --- r: 277563 b: refs/heads/try c: db8a9a9 h: refs/heads/master i: 277561: b171518 277559: 844ce88
1 parent f7477c6 commit 1601754

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 9d151a71c032b655ca457521730044237c9e130e
4+
refs/heads/try: db8a9a92b3dafcd5a8d7207096c8cbb90db0b013
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/libsyntax/errors/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use errors::emitter::{Emitter, EmitterWriter};
2020
use std::cell::{RefCell, Cell};
2121
use std::{error, fmt};
2222
use std::rc::Rc;
23+
use std::thread::panicking;
2324
use term;
2425

2526
pub mod emitter;
@@ -352,7 +353,7 @@ impl<'a> fmt::Debug for DiagnosticBuilder<'a> {
352353
/// we emit a bug.
353354
impl<'a> Drop for DiagnosticBuilder<'a> {
354355
fn drop(&mut self) {
355-
if !self.cancelled() {
356+
if !panicking() && !self.cancelled() {
356357
self.emitter.borrow_mut().emit(&MultiSpan::new(),
357358
"Error constructed but not emitted",
358359
None,

0 commit comments

Comments
 (0)