From 7d1a8f9c1d7dca982f320f4b2c0717cd7e2d9377 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 31 Oct 2024 22:26:27 -0700 Subject: [PATCH] Add test of raw addr expression syntax --- tests/test_ensure.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_ensure.rs b/tests/test_ensure.rs index f41ad37..4fc80e6 100644 --- a/tests/test_ensure.rs +++ b/tests/test_ensure.rs @@ -184,6 +184,12 @@ fn test_unary() { let test = || Ok(ensure!(&mut x == *&&mut &2)); assert_err(test, "Condition failed: `&mut x == *&&mut &2` (1 vs 2)"); + + let test = || Ok(ensure!(S + &raw const x != S + &raw mut x)); + assert_err( + test, + "Condition failed: `S + &raw const x != S + &raw mut x`", // FIXME + ); } #[test]