Skip to content

Commit 780bcee

Browse files
committed
Hide test-only functions behind #[cfg(test)]
1 parent 3f3c5d0 commit 780bcee

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/features.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ mod test {
289289
);
290290
}
291291

292+
#[cfg(test)]
292293
fn test_target(target_str: &str, target: RustTarget) {
293294
let target_string: String = target.into();
294295
assert_eq!(target_str, target_string);

src/ir/analysis/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ mod tests {
265265
struct Graph(HashMap<Node, Vec<Node>>);
266266

267267
impl Graph {
268+
#[cfg(test)]
268269
fn make_test_graph() -> Graph {
269270
let mut g = Graph::default();
270271
g.0.insert(Node(1), vec![Node(3)]);

0 commit comments

Comments
 (0)