sway_core/semantic_analysis/ast_node/
modes.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::{decl_engine::DeclId, language::ty::TyAbiDecl};

#[derive(Clone, PartialEq, Eq, Default)]
pub enum AbiMode {
    ImplAbiFn(sway_types::Ident, Option<DeclId<TyAbiDecl>>),
    #[default]
    NonAbi,
}

#[derive(Clone, Copy, PartialEq, Eq, Default)]
pub enum ConstShadowingMode {
    Sequential,
    #[default]
    ItemStyle,
}

#[derive(Clone, Copy, PartialEq, Eq, Default)]
pub enum GenericShadowingMode {
    Disallow,
    #[default]
    Allow,
}