diff options
| author | Ralf Jung <post@ralfj.de> | 2021-07-18 17:21:59 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2021-07-18 19:11:45 +0200 |
| commit | 6cba79851adbc88f75e50b0eed456f74967ff19c (patch) | |
| tree | b8001cb3861605ca4c7799bfd44f5b7a4ba4709b /library/alloc | |
| parent | 18073052d8c3544ccb73effd289ed3acda0d66c0 (diff) | |
| download | rust-6cba79851adbc88f75e50b0eed456f74967ff19c.tar.gz rust-6cba79851adbc88f75e50b0eed456f74967ff19c.zip | |
better support for running libcore and liballoc tests with Miri
Diffstat (limited to 'library/alloc')
| -rw-r--r-- | library/alloc/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index e8bd4bcb01f..fa1f361a5b6 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -56,6 +56,10 @@ //! [`Rc`]: rc //! [`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)] #![stable(feature = "alloc", since = "1.36.0")] #