Skip to content

Commit

Permalink
Rollup merge of rust-lang#123541 - RalfJung:remove-old-hacks, r=Mark-…
Browse files Browse the repository at this point in the history
…Simulacrum

remove miri-test-libstd hacks that are no longer needed

In rust-lang#123317 we developed a different approach to testing the standard library in Miri, and with rust-lang/miri-test-libstd#56 the out-of-tree miri-test-libstd has been switched to that approach. That makes these hacks here no longer necessary.
  • Loading branch information
GuillaumeGomez authored Apr 6, 2024
2 parents 83d0a94 + a2799ef commit b4a761d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
6 changes: 0 additions & 6 deletions library/alloc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@
//! [`Rc`]: rc
//! [`RefCell`]: core::cell
// To run alloc tests without x.py without ending up with two copies of alloc, Miri needs to be
// able to "empty" this crate. See <https://github.com/rust-lang/miri-test-libstd/issues/4>.
// rustc itself never sets the feature, so this line has no effect there.
#![cfg(any(not(feature = "miri-test-libstd"), test, doctest))]
//
#![allow(unused_attributes)]
#![stable(feature = "alloc", since = "1.36.0")]
#![doc(
Expand All @@ -71,7 +66,6 @@
#![doc(cfg_hide(
not(test),
not(any(test, bootstrap)),
any(not(feature = "miri-test-libstd"), test, doctest),
no_global_oom_handling,
not(no_global_oom_handling),
not(no_rc),
Expand Down
6 changes: 1 addition & 5 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@
//
// This cfg won't affect doc tests.
#![cfg(not(test))]
// To run core tests without x.py without ending up with two copies of core, Miri needs to be
// able to "empty" this crate. See <https://github.com/rust-lang/miri-test-libstd/issues/4>.
// rustc itself never sets the feature, so this line has no effect there.
#![cfg(any(not(feature = "miri-test-libstd"), test, doctest))]
//
#![stable(feature = "core", since = "1.6.0")]
#![doc(
html_playground_url = "https://play.rust-lang.org/",
Expand All @@ -71,7 +68,6 @@
#![doc(rust_logo)]
#![doc(cfg_hide(
not(test),
any(not(feature = "miri-test-libstd"), test, doctest),
no_fp_fmt_parse,
target_pointer_width = "16",
target_pointer_width = "32",
Expand Down
8 changes: 1 addition & 7 deletions library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,7 @@
//! [rust-discord]: https://discord.gg/rust-lang
//! [array]: prim@array
//! [slice]: prim@slice
// To run std tests without x.py without ending up with two copies of std, Miri needs to be
// able to "empty" this crate. See <https://github.com/rust-lang/miri-test-libstd/issues/4>.
// rustc itself never sets the feature, so this line has no effect there.
#![cfg(any(not(feature = "miri-test-libstd"), test, doctest))]
// miri-test-libstd also prefers to make std use the sysroot versions of the dependencies.
#![cfg_attr(feature = "miri-test-libstd", feature(rustc_private))]
//
#![cfg_attr(not(feature = "restricted-std"), stable(feature = "rust1", since = "1.0.0"))]
#![cfg_attr(feature = "restricted-std", unstable(feature = "restricted_std", issue = "none"))]
#![cfg_attr(not(bootstrap), rustc_preserve_ub_checks)]
Expand Down

0 comments on commit b4a761d

Please sign in to comment.