From 5f42aa61d578c8bb2f41ea6e5baf29565d8ee32a Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 3 Nov 2018 10:23:41 +0100 Subject: [PATCH] illegal_write2 does not work with optimizations --- tests/compile-fail/stacked_borrows/illegal_write2.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/compile-fail/stacked_borrows/illegal_write2.rs b/tests/compile-fail/stacked_borrows/illegal_write2.rs index f4fefaad5e2..b53655c8214 100644 --- a/tests/compile-fail/stacked_borrows/illegal_write2.rs +++ b/tests/compile-fail/stacked_borrows/illegal_write2.rs @@ -1,3 +1,7 @@ +// We fail to detect this when neither this nor libstd are optimized/have retagging. +// FIXME: Investigate that. +// compile-flags: -Zmir-opt-level=0 + #![allow(unused_variables)] fn main() {