diff --git a/run-test.sh b/run-test.sh index dda149c..84707ef 100755 --- a/run-test.sh +++ b/run-test.sh @@ -39,9 +39,13 @@ cp "$MIRI_LIB_SRC/Cargo.lock" Cargo.lock # is just a re-export of the sysroot crate, so we don't get duplicate lang items. export MIRI_REPLACE_LIBRS_IF_NOT_TEST=1 -# Set the right rustflags. -export RUSTFLAGS="${RUSTFLAGS:-} -Zforce-unstable-if-unmarked" -export RUSTDOCFLAGS="${RUSTDOCFLAGS:-} -Zforce-unstable-if-unmarked" +# Set the right rustflags (this matches the rustc-build-sysroot defaults): +# - `-Zforce-unstable-if-unmarked`` is always needed for sysroot builds +# - `-Aunexpected_cfgs` since we do not want to be in the business of debugging unexpected_cfgs for +# the sysroot +EXTRAFLAGS="-Zforce-unstable-if-unmarked -Aunexpected_cfgs" +export RUSTFLAGS="${RUSTFLAGS:-} $EXTRAFLAGS" +export RUSTDOCFLAGS="${RUSTDOCFLAGS:-} $EXTRAFLAGS" # run test export CARGO_TARGET_DIR=$(pwd)/target diff --git a/rust-src.diff b/rust-src.diff index e69de29..6ebfe67 100644 --- a/rust-src.diff +++ b/rust-src.diff @@ -0,0 +1,21 @@ +diff --git a/library/core/src/iter/sources/generator.rs b/library/core/src/iter/sources/generator.rs +index c94232e09eb..155fa9368ad 100644 +--- a/library/core/src/iter/sources/generator.rs ++++ b/library/core/src/iter/sources/generator.rs +@@ -9,8 +9,6 @@ + /// + /// ``` + /// #![feature(iter_macro, coroutines)] +-/// # #[cfg(not(bootstrap))] +-/// # { + /// + /// let it = std::iter::iter!{|| { + /// yield 1; +@@ -19,7 +17,6 @@ + /// } }(); + /// let v: Vec<_> = it.collect(); + /// assert_eq!(v, [1, 2, 3]); +-/// # } + /// ``` + #[unstable(feature = "iter_macro", issue = "none", reason = "generators are unstable")] + #[allow_internal_unstable(coroutines, iter_from_coroutine)] diff --git a/rust-version b/rust-version index da3775b..e1c4235 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -nightly-2025-06-01 +nightly-2025-06-06