diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-01 13:46:00 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-01 13:56:24 +1100 |
| commit | 7ef605be3fa24f93194a3faf4f75d3a05ceca78a (patch) | |
| tree | 885014c13c3e6843033a764623c91dbb12b66119 /compiler/rustc_errors/src/emitter.rs | |
| parent | a7d926265f25abfd05b13a3a0144f2ad9dd02dd7 (diff) | |
| download | rust-7ef605be3fa24f93194a3faf4f75d3a05ceca78a.tar.gz rust-7ef605be3fa24f93194a3faf4f75d3a05ceca78a.zip | |
Make the `match` in `emit_diagnostic` complete.
This match is complex enough that it's a good idea to enumerate every variant. This also means `can_be_top_or_sub` can just be `can_be_subdiag`.
Diffstat (limited to 'compiler/rustc_errors/src/emitter.rs')
| -rw-r--r-- | compiler/rustc_errors/src/emitter.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 5637c05d04c..212bda5ff03 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -2104,7 +2104,7 @@ impl HumanEmitter { } if !self.short_message { for child in children { - assert!(child.level.can_be_top_or_sub().1); + assert!(child.level.can_be_subdiag()); let span = &child.span; if let Err(err) = self.emit_messages_default_inner( span, |
