diff options
| author | Ralf Jung <post@ralfj.de> | 2023-09-22 08:25:11 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-09-22 08:51:18 +0200 |
| commit | e888d470e91ee4e027871d850766802a6b6dad86 (patch) | |
| tree | 020ac7c9a6b6f7d41d9c5e85274dcaa8ef6001bd /compiler/rustc_errors/src | |
| parent | b7573187180a6ad13ba557f85b7e19a51f8fdaf1 (diff) | |
| download | rust-e888d470e91ee4e027871d850766802a6b6dad86.tar.gz rust-e888d470e91ee4e027871d850766802a6b6dad86.zip | |
give FutureIncompatibilityReason variants more explicit names
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 3fd087b1d5e..470f318eb33 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -151,7 +151,12 @@ impl fmt::Display for DiagnosticLocation { #[derive(Clone, Debug, PartialEq, Eq, Hash, Encodable, Decodable)] pub enum DiagnosticId { Error(String), - Lint { name: String, has_future_breakage: bool, is_force_warn: bool }, + Lint { + name: String, + /// Indicates whether this lint should show up in cargo's future breakage report. + has_future_breakage: bool, + is_force_warn: bool, + }, } /// A "sub"-diagnostic attached to a parent diagnostic. @@ -301,6 +306,7 @@ impl Diagnostic { } } + /// Indicates whether this diagnostic should show up in cargo's future breakage report. pub fn has_future_breakage(&self) -> bool { match self.code { Some(DiagnosticId::Lint { has_future_breakage, .. }) => has_future_breakage, |
