File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ impl Deferred {
36
36
37
37
unsafe {
38
38
if size <= mem:: size_of :: < Data > ( ) && align <= mem:: align_of :: < Data > ( ) {
39
+ // TODO(taiki-e): when the minimum supported Rust version is bumped to 1.36+,
40
+ // replace this with `mem::MaybeUninit`.
41
+ #[ allow( deprecated) ]
39
42
let mut data: Data = mem:: uninitialized ( ) ;
40
43
ptr:: write ( & mut data as * mut Data as * mut F , f) ;
41
44
@@ -51,6 +54,9 @@ impl Deferred {
51
54
}
52
55
} else {
53
56
let b: Box < F > = Box :: new ( f) ;
57
+ // TODO(taiki-e): when the minimum supported Rust version is bumped to 1.36+,
58
+ // replace this with `mem::MaybeUninit`.
59
+ #[ allow( deprecated) ]
54
60
let mut data: Data = mem:: uninitialized ( ) ;
55
61
ptr:: write ( & mut data as * mut Data as * mut Box < F > , b) ;
56
62
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ impl<T> Queue<T> {
46
46
head : CachePadded :: new ( Atomic :: null ( ) ) ,
47
47
tail : CachePadded :: new ( Atomic :: null ( ) ) ,
48
48
} ;
49
+ // TODO(taiki-e): when the minimum supported Rust version is bumped to 1.36+,
50
+ // replace this with `mem::MaybeUninit`.
51
+ #[ allow( deprecated) ]
49
52
let sentinel = Owned :: new ( Node {
50
53
data : unsafe { mem:: uninitialized ( ) } ,
51
54
next : Atomic :: null ( ) ,
You can’t perform that action at this time.
0 commit comments