Skip to content
Myr

Compile &raw test on Rust 1.82+ only

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Tolnay · committed by David Tolnay · parent 1e7e9fe · Browse files · 1 file+5 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−0 removed

  • tests:+5 added−0 removed

1 file+5 added−0 removed

modified:tests/test_ensure.rs+5 added
182 unmodified lines
183 assert_err(test, "Condition failed: `&x == &&2` (1 vs 2)");184185 let test = || Ok(ensure!(&mut x == *&&mut &2));186 assert_err(test, "Condition failed: `&mut x == *&&mut &2` (1 vs 2)");187}188189#[rustversion::since(1.82)]190#[test]191fn test_raw_addr() {192 let mut x = 1;193 let test = || Ok(ensure!(S + &raw const x != S + &raw mut x));194 assert_err(195 test,196 "Condition failed: `S + &raw const x != S + &raw mut x` (false vs false)",
556 unmodified lines