diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-04-30 19:08:46 +0200 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-05-07 18:24:46 +0200 |
| commit | f2645776dc5e519a0a0bd4e79f2801de197c2fbc (patch) | |
| tree | 8a9fa7f371d32224da1643db0d66cda8e0064c8a /compiler/rustc_middle/src/ty | |
| parent | 0dddad0dc5d614f799d7e04de4895e7a7418eccb (diff) | |
| download | rust-f2645776dc5e519a0a0bd4e79f2801de197c2fbc.tar.gz rust-f2645776dc5e519a0a0bd4e79f2801de197c2fbc.zip | |
Use smaller ints for bitflags
Diffstat (limited to 'compiler/rustc_middle/src/ty')
| -rw-r--r-- | compiler/rustc_middle/src/ty/adt.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/ty/adt.rs b/compiler/rustc_middle/src/ty/adt.rs index 6187fc43cf8..ad9891a5dca 100644 --- a/compiler/rustc_middle/src/ty/adt.rs +++ b/compiler/rustc_middle/src/ty/adt.rs @@ -26,7 +26,7 @@ use super::{Destructor, FieldDef, GenericPredicates, Ty, TyCtxt, VariantDef, Var bitflags! { #[derive(HashStable, TyEncodable, TyDecodable)] - pub struct AdtFlags: u32 { + pub struct AdtFlags: u16 { const NO_ADT_FLAGS = 0; /// Indicates whether the ADT is an enum. const IS_ENUM = 1 << 0; diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 23d6242899f..88b084bbccb 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -1739,7 +1739,7 @@ pub struct Destructor { bitflags! { #[derive(HashStable, TyEncodable, TyDecodable)] - pub struct VariantFlags: u32 { + pub struct VariantFlags: u8 { const NO_VARIANT_FLAGS = 0; /// Indicates whether the field list of this variant is `#[non_exhaustive]`. const IS_FIELD_LIST_NON_EXHAUSTIVE = 1 << 0; |
