diff options
| author | bors <bors@rust-lang.org> | 2019-11-03 08:01:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-11-03 08:01:29 +0000 |
| commit | aa51f04073bf30b8f8815a9526722db823d8911d (patch) | |
| tree | ae17fae77e7770f76b908ace8c440e62b9473de3 /src/librustc_errors | |
| parent | 6c1b220fd747bf244f04b380e4d4ae005068f706 (diff) | |
| parent | 2337bbb8a4131645e4a98ad81524703d76196f82 (diff) | |
| download | rust-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: 
Diffstat (limited to 'src/librustc_errors')
| -rw-r--r-- | src/librustc_errors/diagnostic.rs | 4 |
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), |
