From 2f0fd3e9dac9bfe94a30464c1694a3da190553ca Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 7 Apr 2020 23:23:12 +0200 Subject: [PATCH] miri: enable leakcheck --- run-miri-tests.sh | 4 +--- tests/test.rs | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/run-miri-tests.sh b/run-miri-tests.sh index e0e72d6..1d3c176 100755 --- a/run-miri-tests.sh +++ b/run-miri-tests.sh @@ -8,6 +8,4 @@ rustup toolchain add "$MIRI_NIGHTLY" rustup component add miri --toolchain "$MIRI_NIGHTLY" rustup run "$MIRI_NIGHTLY" -- cargo miri setup -# Miri considers runtime-allocated data in statics as leaked, so we -# have to ignore leeks. See . -rustup run "$MIRI_NIGHTLY" -- cargo miri test -- -Zmiri-ignore-leaks +rustup run "$MIRI_NIGHTLY" -- cargo miri test diff --git a/tests/test.rs b/tests/test.rs index 7cd085d..c1351a7 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -448,7 +448,6 @@ mod sync { } #[test] - #[cfg_attr(miri, ignore)] // leaks memory fn static_lazy() { static XS: Lazy> = Lazy::new(|| { let mut xs = Vec::new(); @@ -467,7 +466,6 @@ mod sync { } #[test] - #[cfg_attr(miri, ignore)] // leaks memory fn static_lazy_via_fn() { fn xs() -> &'static Vec { static XS: OnceCell> = OnceCell::new();