diff options
Diffstat (limited to 'crates/hir_def/src/item_tree.rs')
-rw-r--r-- | crates/hir_def/src/item_tree.rs | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/crates/hir_def/src/item_tree.rs b/crates/hir_def/src/item_tree.rs index c6d700977..739906778 100644 --- a/crates/hir_def/src/item_tree.rs +++ b/crates/hir_def/src/item_tree.rs | |||
@@ -569,20 +569,21 @@ pub enum Param { | |||
569 | Varargs, | 569 | Varargs, |
570 | } | 570 | } |
571 | 571 | ||
572 | bitflags::bitflags! { | 572 | #[derive(Debug, Clone, Copy, Eq, PartialEq, Default)] |
573 | /// NOTE: Shared with `FunctionData` | 573 | pub(crate) struct FnFlags { |
574 | pub(crate) struct FnFlags: u8 { | 574 | pub(crate) bits: u8, |
575 | const HAS_SELF_PARAM = 1 << 0; | 575 | } |
576 | const HAS_BODY = 1 << 1; | 576 | impl FnFlags { |
577 | const IS_DEFAULT = 1 << 2; | 577 | pub(crate) const HAS_SELF_PARAM: u8 = 1 << 0; |
578 | const IS_CONST = 1 << 3; | 578 | pub(crate) const HAS_BODY: u8 = 1 << 1; |
579 | const IS_ASYNC = 1 << 4; | 579 | pub(crate) const IS_DEFAULT: u8 = 1 << 2; |
580 | const IS_UNSAFE = 1 << 5; | 580 | pub(crate) const IS_CONST: u8 = 1 << 3; |
581 | /// Whether the function is located in an `extern` block (*not* whether it is an | 581 | pub(crate) const IS_ASYNC: u8 = 1 << 4; |
582 | /// `extern "abi" fn`). | 582 | pub(crate) const IS_UNSAFE: u8 = 1 << 5; |
583 | const IS_IN_EXTERN_BLOCK = 1 << 6; | 583 | /// Whether the function is located in an `extern` block (*not* whether it is an |
584 | const IS_VARARGS = 1 << 7; | 584 | /// `extern "abi" fn`). |
585 | } | 585 | pub(crate) const IS_IN_EXTERN_BLOCK: u8 = 1 << 6; |
586 | pub(crate) const IS_VARARGS: u8 = 1 << 7; | ||
586 | } | 587 | } |
587 | 588 | ||
588 | #[derive(Debug, Clone, Eq, PartialEq)] | 589 | #[derive(Debug, Clone, Eq, PartialEq)] |