We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76c5996 commit 680ee79Copy full SHA for 680ee79
text/0000-assert_ne.md
@@ -8,6 +8,7 @@
8
9
`assert_ne` is a macro that takes 2 arguments and panics if they are equal. It
10
works and is implemented identically to `assert_eq` and serves as its complement.
11
+This proposal also includes a `debug_asset_ne`, matching `debug_assert_eq`.
12
13
# Motivation
14
[motivation]: #motivation
@@ -38,6 +39,14 @@ macro_rules! assert_ne {
38
39
}
40
```
41
42
+This is complemented by a `debug_assert_ne` (similar to `debug_assert_eq`):
43
+
44
+```rust
45
+macro_rules! debug_assert_ne {
46
+ ($($arg:tt)*) => (if cfg!(debug_assertions) { assert_ne!($($arg)*); })
47
+}
48
+```
49
50
# Drawbacks
51
[drawbacks]: #drawbacks
52
0 commit comments