luaur_analysis/enums/skip_test_result.rs
1#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2#[repr(i32)]
3#[allow(non_camel_case_types)]
4pub enum SkipTestResult {
5 /// If a type function is cyclic, it cannot be reduced, but maybe we can
6 /// make a guess and offer a suggested annotation to the user.
7 CyclicTypeFunction,
8
9 /// Indicase that we will not be able to reduce this type function this
10 /// time. Constraint resolution may cause this type function to become
11 /// reducible later.
12 Irreducible,
13
14 /// A type function that cannot be reduced any further because it has no valid reduction.
15 /// eg add<number, string>
16 Stuck,
17
18 /// Some type functions can operate on generic parameters
19 Generic,
20
21 /// We might be able to reduce this type function, but not yet.
22 Defer,
23
24 /// We can attempt to reduce this type function right now.
25 Okay,
26}
27
28impl SkipTestResult {
29 pub const CyclicTypeFunction: Self = Self::CyclicTypeFunction;
30 pub const Irreducible: Self = Self::Irreducible;
31 pub const Stuck: Self = Self::Stuck;
32 pub const Generic: Self = Self::Generic;
33 pub const Defer: Self = Self::Defer;
34 pub const Okay: Self = Self::Okay;
35}
36
37impl Default for SkipTestResult {
38 fn default() -> Self {
39 Self::Okay
40 }
41}