about summary refs log tree commit diff
path: root/src/libsyntax/errors
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-04-27 13:49:45 -0700
committerbors <bors@rust-lang.org>2016-04-27 13:49:45 -0700
commitcda7c1cf2463443aee4a2f51a5141bc7ce4a4f97 (patch)
tree52be2ea17940cd98bbdfdc205d2552ce71eb127d /src/libsyntax/errors
parentb52d76a08528273b218f168753ed846ecfb59aec (diff)
parent6887202ea3a1d3e3df0c88c07c754defd87b9712 (diff)
downloadrust-cda7c1cf2463443aee4a2f51a5141bc7ce4a4f97.tar.gz
rust-cda7c1cf2463443aee4a2f51a5141bc7ce4a4f97.zip
Auto merge of #33199 - mitaa:tokenize-responsibly, r=nrc
Make some fatal lexer errors recoverable

I've kept the changes to a minimum since I'm not really sure if this approach is a acceptable.

fixes #12834

cc @nrc
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,