This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -55,14 +55,12 @@ use crate::ptr;
5555/// and implementors must ensure such contracts remain true.
5656///
5757/// * 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
6059/// eliminate entirely or move to the stack and thus never invoke the allocator. The
6160/// optimizer may further assume that allocation is infallible, so code that used to fail due
6261/// 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.
6664///
6765/// ```rust,ignore (unsound and has placeholders)
6866/// drop(Box::new(42));
Original file line number Diff line number Diff line change @@ -99,9 +99,8 @@ pub unsafe trait AllocRef {
9999 /// eliminate entirely or move to the stack and thus never invoke the allocator. The
100100 /// optimizer may further assume that allocation is infallible, so code that used to fail due
101101 /// 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.
105104 ///
106105 /// ```rust,ignore (unsound and has placeholders)
107106 /// Global::dealloc(Global::alloc(some_layout));
You can’t perform that action at this time.
0 commit comments