Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/signatures.rs')
-rw-r--r--crates/hir-def/src/signatures.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/hir-def/src/signatures.rs b/crates/hir-def/src/signatures.rs
index 45dab8859d..ab5d377387 100644
--- a/crates/hir-def/src/signatures.rs
+++ b/crates/hir-def/src/signatures.rs
@@ -52,7 +52,7 @@ pub struct StructSignature {
bitflags! {
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
- pub struct StructFlags: u8 {
+ pub struct StructFlags: u16 {
/// Indicates whether this struct has `#[repr]`.
const HAS_REPR = 1 << 0;
/// Indicates whether the struct has a `#[rustc_has_incoherent_inherent_impls]` attribute.
@@ -69,6 +69,8 @@ bitflags! {
const IS_UNSAFE_CELL = 1 << 6;
/// Indicates whether this struct is `UnsafePinned`.
const IS_UNSAFE_PINNED = 1 << 7;
+ /// Indicates whether this struct is `CovariantUnsafeCell`.
+ const IS_COVARIANT_UNSAFE_CELL = 1 << 8;
}
}
@@ -104,6 +106,9 @@ impl StructSignature {
_ if lang == sym::owned_box => flags |= StructFlags::IS_BOX,
_ if lang == sym::manually_drop => flags |= StructFlags::IS_MANUALLY_DROP,
_ if lang == sym::unsafe_cell => flags |= StructFlags::IS_UNSAFE_CELL,
+ _ if lang == sym::covariant_unsafe_cell => {
+ flags |= StructFlags::IS_COVARIANT_UNSAFE_CELL
+ }
_ if lang == sym::unsafe_pinned => flags |= StructFlags::IS_UNSAFE_PINNED,
_ => (),
}