diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a091aa3cb..92019f1f8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -168,24 +168,14 @@ jobs: # Run under both the stacked borrows model (default) and under the tree # borrows model to ensure we're compliant with both. for EXTRA_FLAGS in "" "-Zmiri-tree-borrows"; do - # On `--skip ui`: Skip the `ui` test since it invokes the compiler, - # which we can't do from Miri (and wouldn't want to do anyway). - # - # On `matrix.features == '--all-features': We mark tests which are - # particularly expensive to run under Miri as - # `#[cfg_attr(miri, ignore)]`. We want to run them once per - # toolchain/target combination, but not once per feature set so we - # keep the expensive computation to a minimum. - # - # TODO(#391): Optimize these tests. + # Skip the `ui` test since it invokes the compiler, which we can't do + # from Miri (and wouldn't want to do anyway). MIRIFLAGS="$MIRIFLAGS $EXTRA_FLAGS" ./cargo.sh +${{ matrix.toolchain }} \ miri test \ --package ${{ matrix.crate }} \ --target ${{ matrix.target }} \ ${{ matrix.features }} \ - -- --skip ui \ - ${{ matrix.features == '--all-features' && '--ignored' || '' }} - + -- --skip ui done # Only nightly has a working Miri, so we skip installing on all other # toolchains. diff --git a/src/lib.rs b/src/lib.rs index b476327c64..8bae825f5d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3325,10 +3325,7 @@ mod tests { .for_each(validate_behavior); } - // TODO(#391): Optimize this test so we it consumes less time under Miri in - // CI. #[test] - #[cfg_attr(miri, ignore)] #[cfg(__INTERNAL_USE_ONLY_NIGHLTY_FEATURES_IN_TESTS)] fn test_validate_rust_layout() { use core::ptr::NonNull;