rustc_errors: only box the diagnostic field in DiagnosticBuilder.

This commit is contained in:
Eduard-Mihai Burtescu 2022-01-24 11:23:14 +00:00
parent 68fa81baa3
commit a8dfa3757c
3 changed files with 25 additions and 31 deletions

View file

@ -54,9 +54,9 @@ pub use snippet::Style;
pub type PResult<'a, T> = Result<T, DiagnosticBuilder<'a>>;
// `PResult` is used a lot. Make sure it doesn't unintentionally get bigger.
// (See also the comment on `DiagnosticBuilderInner`.)
// (See also the comment on `DiagnosticBuilder`'s `diagnostic` field.)
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(PResult<'_, bool>, 16);
rustc_data_structures::static_assert_size!(PResult<'_, bool>, 24);
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, Encodable, Decodable)]
pub enum SuggestionStyle {