about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/snippet.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-01-30 17:10:48 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-02-01 19:23:01 +1100
commit2621f7fd9ba97bbbd1b5b1df96184353948e2249 (patch)
treebe6f511534676e6619631dcac0dde196c76ed874 /compiler/rustc_errors/src/snippet.rs
parent26eb6da4e7f19fd1408eac2c67891f3dbfc47e5a (diff)
downloadrust-2621f7fd9ba97bbbd1b5b1df96184353948e2249.tar.gz
rust-2621f7fd9ba97bbbd1b5b1df96184353948e2249.zip
Rework `StringPart`.
When there are two possibilities, both of which use a `String`, it's
nicer to use a struct than an enum. Especially when mapping the contents
into a tuple.
Diffstat (limited to 'compiler/rustc_errors/src/snippet.rs')
-rw-r--r--compiler/rustc_errors/src/snippet.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/snippet.rs b/compiler/rustc_errors/src/snippet.rs
index 98eb70b5fce..b55f7853885 100644
--- a/compiler/rustc_errors/src/snippet.rs
+++ b/compiler/rustc_errors/src/snippet.rs
@@ -197,7 +197,7 @@ pub struct StyledString {
     pub style: Style,
 }
 
-#[derive(Copy, Clone, Debug, PartialEq, Hash, Encodable, Decodable)]
+#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Encodable, Decodable)]
 pub enum Style {
     MainHeaderMsg,
     HeaderMsg,