about summary refs log tree commit diff
path: root/src/test/incremental/hygiene
diff options
context:
space:
mode:
authorWesley Wiser <wwiser@gmail.com>2020-12-09 07:18:32 -0500
committerWesley Wiser <wwiser@gmail.com>2020-12-09 07:18:32 -0500
commitaeb3061c40593e9cfbb52a1d5c8dafb1bd3e6a18 (patch)
tree0fc4a45bcb282d83111ec6d9f9423285a9fb9c2e /src/test/incremental/hygiene
parent318626710ee96b6ac2c59480bfc5f03048239220 (diff)
downloadrust-aeb3061c40593e9cfbb52a1d5c8dafb1bd3e6a18.tar.gz
rust-aeb3061c40593e9cfbb52a1d5c8dafb1bd3e6a18.zip
Update two failing incremental tests for the new behavior
On the nopt builders, we disable optimization by default for all tests
which causes the new behavior to take effect and causes the tests to
fail when they should not. By passing the `-O` flag explicitly, we will
always run these tests with optimizations enabled.
Diffstat (limited to 'src/test/incremental/hygiene')
-rw-r--r--src/test/incremental/hygiene/load_cached_hygiene.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/test/incremental/hygiene/load_cached_hygiene.rs b/src/test/incremental/hygiene/load_cached_hygiene.rs
index 8124141418b..d6a5cb993a4 100644
--- a/src/test/incremental/hygiene/load_cached_hygiene.rs
+++ b/src/test/incremental/hygiene/load_cached_hygiene.rs
@@ -1,5 +1,5 @@
 // revisions:rpass1 rpass2
-// compile-flags: -Z query-dep-graph
+// compile-flags: -Z query-dep-graph -O
 // aux-build:cached_hygiene.rs
 
 // This tests the folllowing scenario
@@ -19,7 +19,12 @@
 // the metadata. Specifically, we were not resetting `orig_id`
 // for an `EpxnData` generate in the current crate, which would cause
 // us to serialize the `ExpnId` pointing to a garbage location in
-// the metadata.
+// the metadata.o
+
+// NOTE: We're explicitly passing the `-O` optimization flag because if optimizations are not
+// enabled, then rustc will ignore the `#[inline(always)]` attribute which means we do not load
+// the optimized mir for the unmodified function to be loaded and so the CGU containing that
+// function will be reused.
 
 #![feature(rustc_attrs)]