Skip to content

Commit fcf2ef8

Browse files
committed
Compile &raw test on Rust 1.82+ only
1 parent 1e7e9fe commit fcf2ef8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_ensure.rs

+5
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,12 @@ fn test_unary() {
184184

185185
let test = || Ok(ensure!(&mut x == *&&mut &2));
186186
assert_err(test, "Condition failed: `&mut x == *&&mut &2` (1 vs 2)");
187+
}
187188

189+
#[rustversion::since(1.82)]
190+
#[test]
191+
fn test_raw_addr() {
192+
let mut x = 1;
188193
let test = || Ok(ensure!(S + &raw const x != S + &raw mut x));
189194
assert_err(
190195
test,

0 commit comments

Comments
 (0)