Skip to content

Commit 4dd9afa

Browse files
authored
Avoid exporting extra_assert macros (#2606)
1 parent 9f57c67 commit 4dd9afa

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@
179179
equal to or greater than 1.71.
180180
This comes as a result of the ABI being stabilised (in Rust 1.71).
181181
## Removed
182+
- The `extra_assert` and `extra_assert_eq` macros are no longer exported.
182183
## Fixed
183184
- Bindgen no longer panics when parsing an objective-C header that includes a
184185
Rust keyword that cannot be a raw identifier, such as: `self`, `crate`,

bindgen/extra_assertions.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
44
/// Simple macro that forwards to assert! when using
55
/// __testing_only_extra_assertions.
6-
#[macro_export]
76
macro_rules! extra_assert {
87
( $cond:expr ) => {
98
if cfg!(feature = "__testing_only_extra_assertions") {
@@ -16,19 +15,3 @@ macro_rules! extra_assert {
1615
}
1716
};
1817
}
19-
20-
/// Simple macro that forwards to assert_eq! when using
21-
/// __testing_only_extra_assertions.
22-
#[macro_export]
23-
macro_rules! extra_assert_eq {
24-
( $lhs:expr , $rhs:expr ) => {
25-
if cfg!(feature = "__testing_only_extra_assertions") {
26-
assert_eq!($lhs, $rhs);
27-
}
28-
};
29-
( $lhs:expr , $rhs:expr , $( $arg:tt )+ ) => {
30-
if cfg!(feature = "__testing_only_extra_assertions") {
31-
assert!($lhs, $rhs, $( $arg )* );
32-
}
33-
};
34-
}

0 commit comments

Comments
 (0)