File tree 2 files changed +5
-8
lines changed
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -55,14 +55,12 @@ use crate::ptr;
55
55
/// and implementors must ensure such contracts remain true.
56
56
///
57
57
/// * You may not rely on allocations actually happening, even if there are explicit
58
- /// heap allocations in the source.
59
- /// The optimizer may detect unused allocations that it can either
58
+ /// heap allocations in the source. The optimizer may detect unused allocations that it can either
60
59
/// eliminate entirely or move to the stack and thus never invoke the allocator. The
61
60
/// optimizer may further assume that allocation is infallible, so code that used to fail due
62
61
/// to allocator failures may now suddenly work because the optimizer worked around the
63
- /// need for an allocation.
64
- /// More concretely, the following code example is unsound, irrespective of whether your
65
- /// custom allocator allows counting how many allocations have happened.
62
+ /// need for an allocation. More concretely, the following code example is unsound, irrespective
63
+ /// of whether your custom allocator allows counting how many allocations have happened.
66
64
///
67
65
/// ```rust,ignore (unsound and has placeholders)
68
66
/// drop(Box::new(42));
Original file line number Diff line number Diff line change @@ -99,9 +99,8 @@ pub unsafe trait AllocRef {
99
99
/// eliminate entirely or move to the stack and thus never invoke the allocator. The
100
100
/// optimizer may further assume that allocation is infallible, so code that used to fail due
101
101
/// to allocator failures may now suddenly work because the optimizer worked around the
102
- /// need for an allocation.
103
- /// More concretely, the following code example is unsound, irrespective of whether your
104
- /// custom allocator allows counting how many allocations have happened.
102
+ /// need for an allocation. More concretely, the following code example is unsound, irrespective
103
+ /// of whether your custom allocator allows counting how many allocations have happened.
105
104
///
106
105
/// ```rust,ignore (unsound and has placeholders)
107
106
/// Global::dealloc(Global::alloc(some_layout));
You can’t perform that action at this time.
0 commit comments