File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,14 @@ extern crate std;
1111use self :: std:: prelude:: v1:: * ;
1212use self :: std:: cell:: Cell ;
1313use self :: std:: sync:: Once ;
14+ #[ allow( deprecated) ]
1415pub use self :: std:: sync:: ONCE_INIT ;
1516
1617// FIXME: Replace Option<T> with MaybeInitialized<T>
1718pub struct Lazy < T : Sync > ( Cell < Option < T > > , Once ) ;
1819
1920impl < T : Sync > Lazy < T > {
21+ #[ allow( deprecated) ]
2022 pub const INIT : Self = Lazy ( Cell :: new ( None ) , ONCE_INIT ) ;
2123
2224 #[ inline( always) ]
@@ -61,5 +63,6 @@ macro_rules! __lazy_static_create {
6163/// This should be replaced by std's version when lazy_static starts to require at least Rust 1.27.
6264unsafe fn unreachable_unchecked ( ) -> ! {
6365 enum Void { }
66+ #[ allow( deprecated) ]
6467 match std:: mem:: uninitialized :: < Void > ( ) { }
6568}
Original file line number Diff line number Diff line change @@ -133,9 +133,11 @@ fn item_name_shadowing() {
133133}
134134
135135use std:: sync:: atomic:: AtomicBool ;
136+ #[ allow( deprecated) ]
136137use std:: sync:: atomic:: ATOMIC_BOOL_INIT ;
137138use std:: sync:: atomic:: Ordering :: SeqCst ;
138139
140+ #[ allow( deprecated) ]
139141static PRE_INIT_FLAG : AtomicBool = ATOMIC_BOOL_INIT ;
140142
141143lazy_static ! {
You can’t perform that action at this time.
0 commit comments