Skip to content

Commit fd0449c

Browse files
committed
make congruence-closure (and hence impl Trait) optional
1 parent 4989ded commit fd0449c

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ repository = "https://github.com/nikomatsakis/ena"
77
version = "0.5.0"
88
authors = ["Niko Matsakis <[email protected]>"]
99

10+
[features]
11+
congruence-closure = [ "petgraph" ]
12+
1013
[dependencies]
1114
log = "0.3"
12-
petgraph = "0.4.5"
15+
petgraph = { version = "0.4.5", optional = true }

src/cc/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg(feature = "congruence-closure")]
2+
13
//! An implementation of the Congruence Closure algorithm based on the
24
//! paper "Fast Decision Procedures Based on Congruence Closure" by Nelson
35
//! and Oppen, JACM 1980.

src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(conservative_impl_trait)]
11+
// The CC code uses `impl Trait`
12+
#![cfg_attr(feature = "congruence-closure", feature(conservative_impl_trait))]
1213

1314
#[macro_use]
1415
extern crate log;
16+
17+
#[cfg(feature = "congruence-closure")]
1518
extern crate petgraph;
1619

1720
pub mod snapshot_vec;

0 commit comments

Comments
 (0)