better support for running libcore and liballoc tests with Miri
This commit is contained in:
parent
18073052d8
commit
6cba79851a
|
@ -56,6 +56,10 @@
|
||||||
//! [`Rc`]: rc
|
//! [`Rc`]: rc
|
||||||
//! [`RefCell`]: core::cell
|
//! [`RefCell`]: core::cell
|
||||||
|
|
||||||
|
// To run liballoc tests without x.py without ending up with two copies of liballoc, 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 affect there.
|
||||||
|
#![cfg(any(not(feature = "miri-test-libstd"), test, doctest))]
|
||||||
#![allow(unused_attributes)]
|
#![allow(unused_attributes)]
|
||||||
#![stable(feature = "alloc", since = "1.36.0")]
|
#![stable(feature = "alloc", since = "1.36.0")]
|
||||||
#![doc(
|
#![doc(
|
||||||
|
|
|
@ -49,6 +49,10 @@
|
||||||
//
|
//
|
||||||
// This cfg won't affect doc tests.
|
// This cfg won't affect doc tests.
|
||||||
#![cfg(not(test))]
|
#![cfg(not(test))]
|
||||||
|
// To run libcore tests without x.py without ending up with two copies of libcore, 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 affect there.
|
||||||
|
#![cfg(any(not(feature = "miri-test-libstd"), test, doctest))]
|
||||||
#![stable(feature = "core", since = "1.6.0")]
|
#![stable(feature = "core", since = "1.6.0")]
|
||||||
#![doc(
|
#![doc(
|
||||||
html_playground_url = "https://play.rust-lang.org/",
|
html_playground_url = "https://play.rust-lang.org/",
|
||||||
|
|
Loading…
Reference in a new issue