about summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-11-03 08:01:29 +0000
committerbors <bors@rust-lang.org>2019-11-03 08:01:29 +0000
commitaa51f04073bf30b8f8815a9526722db823d8911d (patch)
treeae17fae77e7770f76b908ace8c440e62b9473de3 /src/librustc_errors
parent6c1b220fd747bf244f04b380e4d4ae005068f706 (diff)
parent2337bbb8a4131645e4a98ad81524703d76196f82 (diff)
downloadrust-aa51f04073bf30b8f8815a9526722db823d8911d.tar.gz
rust-aa51f04073bf30b8f8815a9526722db823d8911d.zip
Auto merge of #65779 - kevgrasso:E0308highlight, r=estebank
Highlight only relevant parts of type path in type errors

Resolves #57413.

Unfortunately the current Rust UI testing setup can't test that the correct colors are being used in a given output, so here's a screenshot of a small test program I wrote:
![image](https://user-images.githubusercontent.com/480789/67530063-f272af00-f68b-11e9-9f96-a211fc7666d4.png)
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/diagnostic.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_errors/diagnostic.rs b/src/librustc_errors/diagnostic.rs
index 1781f2e1650..5a09898f18f 100644
--- a/src/librustc_errors/diagnostic.rs
+++ b/src/librustc_errors/diagnostic.rs
@@ -34,7 +34,7 @@ pub struct SubDiagnostic {
     pub render_span: Option<MultiSpan>,
 }
 
-#[derive(PartialEq, Eq)]
+#[derive(Debug, PartialEq, Eq)]
 pub struct DiagnosticStyledString(pub Vec<StringPart>);
 
 impl DiagnosticStyledString {
@@ -60,7 +60,7 @@ impl DiagnosticStyledString {
     }
 }
 
-#[derive(PartialEq, Eq)]
+#[derive(Debug, PartialEq, Eq)]
 pub enum StringPart {
     Normal(String),
     Highlighted(String),