From 1f945cc2df629abd916ddfbb66274e73be13c3be Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 30 Jun 2019 17:52:28 +0200 Subject: [PATCH] debug on AppVeyor --- .appveyor.yml | 1 + tests/run-pass/heap_allocator.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index f7d3f990ac..225c2a38bc 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -31,6 +31,7 @@ install: build_script: - set RUST_TEST_NOCAPTURE=1 - set RUST_BACKTRACE=1 + - set MIRI_BACKTRACE=1 - set RUSTFLAGS=-C debug-assertions # Build and install miri - cargo build --release --all-features --all-targets diff --git a/tests/run-pass/heap_allocator.rs b/tests/run-pass/heap_allocator.rs index 3eb0f70fd6..d5d1652352 100644 --- a/tests/run-pass/heap_allocator.rs +++ b/tests/run-pass/heap_allocator.rs @@ -40,7 +40,8 @@ fn check_overalign_requests(mut allocator: T) { allocator.alloc(Layout::from_size_align(size, align).unwrap()).unwrap() }).collect(); for &ptr in &pointers { - assert_eq!((ptr.as_ptr() as usize) % align, 0, + let ptr = ptr.as_ptr() as usize; + assert_eq!(ptr % align, 0, "Got a pointer less aligned than requested") }