File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ edition = "2018"
1010name  = " alloc_miri_test" 
1111path  = " ../liballoc/src/lib.rs" 
1212
13+ [features ]
14+ #  Set `cfg(feature = "miri-test")` to make the crate empty unless rustdoc is collecting doctests.
15+ default  = [" miri-test"  ]
16+ miri-test  = []
17+ 
1318[dependencies ]
1419
1520[dev-dependencies ]
Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ path = "../libcore/src/lib.rs"
1212test  = false 
1313bench  = false 
1414
15+ [features ]
16+ #  Set `cfg(feature = "miri-test")` to make the crate empty unless rustdoc is collecting doctests.
17+ default  = [" miri-test"  ]
18+ miri-test  = []
19+ 
1520[[test ]]
1621name  = " coretests" 
1722path  = " ../libcore/tests/lib.rs" 
Original file line number Diff line number Diff line change 1+ diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs 
2+ index e8bd4bcb..cc518cc4 100644
3+ --- a/library/alloc/src/lib.rs 
4+ +++ b/library/alloc/src/lib.rs 
5+ @@ -56,6 +56,7 @@ 
6+  //! [`Rc`]: rc
7+  //! [`RefCell`]: core::cell
8+  
9+ + #![cfg(any(not(feature = "miri-test"), doctest))]
10+  #![allow(unused_attributes)]
11+  #![stable(feature = "alloc", since = "1.36.0")]
12+  #![doc(
13+ diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs 
14+ index 3557dbad..6c089b0c 100644
15+ --- a/library/core/src/lib.rs 
16+ +++ b/library/core/src/lib.rs 
17+ @@ -49,6 +49,7 @@ 
18+  //
19+  // This cfg won't affect doc tests.
20+  #![cfg(not(test))]
21+ + #![cfg(any(not(feature = "miri-test"), doctest))]
22+  #![stable(feature = "core", since = "1.6.0")]
23+  #![doc(
24+      html_playground_url = "https://play.rust-lang.org/",
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments