diff options
| author | bors <bors@rust-lang.org> | 2023-09-22 10:34:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-22 10:34:45 +0000 |
| commit | 03c199af8e0f10c4fe4ead8e97e65286bef86e7d (patch) | |
| tree | 9e771d0cbd662db18ef1cc7aaea1316a2e47307b /compiler/rustc_errors/src | |
| parent | 5a4e47ebedb4132168c1b22262f21f0d3a2a96df (diff) | |
| parent | 1a18ec0dcf88f35b4682e7f630cbd3b167b56e92 (diff) | |
| download | rust-03c199af8e0f10c4fe4ead8e97e65286bef86e7d.tar.gz rust-03c199af8e0f10c4fe4ead8e97e65286bef86e7d.zip | |
Auto merge of #116054 - matthiaskrgr:rollup-3pusno6, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #114379 (Command: also print removed env vars) - #116034 (add UI test for delimiter errors) - #116036 (tests/ui: Split large_moves.rs and move to lint/large_assignments) - #116038 (Fall back to _SC_NPROCESSORS_ONLN if sched_getaffinity returns an empty mask) - #116039 (Account for nested `impl Trait` in TAIT) - #116041 (Add note to `is_known_rigid`) - #116049 (give FutureIncompatibilityReason variants more explicit names) r? `@ghost` `@rustbot` modify labels: rollup
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, |
