Skip to content

Commit fba17e3

Browse files
committed
Adjust markdown text to be more like the rendered text
1 parent 714feab commit fba17e3

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

library/core/src/alloc/global.rs

+3-5
Original file line numberDiff line numberDiff 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));

library/core/src/alloc/mod.rs

+2-3
Original file line numberDiff line numberDiff 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));

0 commit comments

Comments
 (0)