mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
Reorder items
This commit is contained in:
parent
bfe1efca26
commit
dab8870f5c
1 changed files with 9 additions and 9 deletions
|
@ -17,6 +17,15 @@ pub struct DnfExpr {
|
||||||
conjunctions: Vec<Conjunction>,
|
conjunctions: Vec<Conjunction>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct Conjunction {
|
||||||
|
literals: Vec<Literal>,
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Literal {
|
||||||
|
negate: bool,
|
||||||
|
var: Option<CfgAtom>, // None = Invalid
|
||||||
|
}
|
||||||
|
|
||||||
impl DnfExpr {
|
impl DnfExpr {
|
||||||
pub fn new(expr: CfgExpr) -> Self {
|
pub fn new(expr: CfgExpr) -> Self {
|
||||||
let builder = Builder { expr: DnfExpr { conjunctions: Vec::new() } };
|
let builder = Builder { expr: DnfExpr { conjunctions: Vec::new() } };
|
||||||
|
@ -133,10 +142,6 @@ impl fmt::Display for DnfExpr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Conjunction {
|
|
||||||
literals: Vec<Literal>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Conjunction {
|
impl Conjunction {
|
||||||
fn new(parts: Vec<CfgExpr>) -> Self {
|
fn new(parts: Vec<CfgExpr>) -> Self {
|
||||||
let mut literals = Vec::new();
|
let mut literals = Vec::new();
|
||||||
|
@ -177,11 +182,6 @@ impl fmt::Display for Conjunction {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Literal {
|
|
||||||
negate: bool,
|
|
||||||
var: Option<CfgAtom>, // None = Invalid
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Literal {
|
impl Literal {
|
||||||
fn new(expr: CfgExpr) -> Self {
|
fn new(expr: CfgExpr) -> Self {
|
||||||
match expr {
|
match expr {
|
||||||
|
|
Loading…
Reference in a new issue