about summary refs log tree commit diff
path: root/src/libsyntax/errors
diff options
context:
space:
mode:
authormitaa <mitaa.ceb@gmail.com>2016-04-25 17:20:32 +0200
committermitaa <mitaa.ceb@gmail.com>2016-04-27 20:48:18 +0200
commit6887202ea3a1d3e3df0c88c07c754defd87b9712 (patch)
tree8482535a9f58e567728140d8be863f1add112ef8 /src/libsyntax/errors
parent645dd013ac6b334ab5bf7a7240c2243f4bb590c9 (diff)
downloadrust-6887202ea3a1d3e3df0c88c07c754defd87b9712.tar.gz
rust-6887202ea3a1d3e3df0c88c07c754defd87b9712.zip
Make some fatal lexer errors recoverable
Diffstat (limited to 'src/libsyntax/errors')
-rw-r--r--src/libsyntax/errors/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax/errors/mod.rs b/src/libsyntax/errors/mod.rs
index acf65fe15b1..792828b3054 100644
--- a/src/libsyntax/errors/mod.rs
+++ b/src/libsyntax/errors/mod.rs
@@ -177,6 +177,7 @@ impl error::Error for ExplicitBug {
 
 /// Used for emitting structured error messages and other diagnostic information.
 #[must_use]
+#[derive(Clone)]
 pub struct DiagnosticBuilder<'a> {
     emitter: &'a RefCell<Box<Emitter>>,
     level: Level,
@@ -187,6 +188,7 @@ pub struct DiagnosticBuilder<'a> {
 }
 
 /// For example a note attached to an error.
+#[derive(Clone)]
 struct SubDiagnostic {
     level: Level,
     message: String,