Skip to content

Commit 143c05a

Browse files
authored
Merge pull request #4438 from RalfJung/genmc-conditional-import
use more clever approach for genmc conditional import
2 parents 5ce7a04 + 8fc0fd5 commit 143c05a

File tree

1 file changed

+3
-12
lines changed
  • src/tools/miri/src/concurrency

1 file changed

+3
-12
lines changed

src/tools/miri/src/concurrency/mod.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,9 @@ mod vector_clock;
99
pub mod weak_memory;
1010

1111
// Import either the real genmc adapter or a dummy module.
12-
cfg_select! {
13-
feature = "genmc" => {
14-
mod genmc;
15-
pub use self::genmc::{GenmcCtx, GenmcConfig};
16-
}
17-
_ => {
18-
#[path = "genmc/dummy.rs"]
19-
mod genmc_dummy;
20-
use self::genmc_dummy as genmc;
21-
pub use self::genmc::{GenmcCtx, GenmcConfig};
22-
}
23-
}
12+
#[cfg_attr(not(feature = "genmc"), path = "genmc/dummy.rs")]
13+
mod genmc;
2414

2515
pub use self::data_race_handler::{AllocDataRaceHandler, GlobalDataRaceHandler};
16+
pub use self::genmc::{GenmcConfig, GenmcCtx};
2617
pub use self::vector_clock::VClock;

0 commit comments

Comments
 (0)