about summary refs log tree commit diff
diff options
context:
space:
mode:
authoroli <github35764891676564198441@oli-obk.de>2020-12-26 17:14:49 +0000
committeroli <github35764891676564198441@oli-obk.de>2020-12-26 17:14:49 +0000
commitfba17e3f8d00acf67f1fe86590c4e9c0671dd2bc (patch)
treed083063f3744082f9f4b416793b955a3dcb0f7fd
parent714feab05993c35e971a307191ee662932df1ee5 (diff)
downloadrust-fba17e3f8d00acf67f1fe86590c4e9c0671dd2bc.tar.gz
rust-fba17e3f8d00acf67f1fe86590c4e9c0671dd2bc.zip
Adjust markdown text to be more like the rendered text
-rw-r--r--library/core/src/alloc/global.rs8
-rw-r--r--library/core/src/alloc/mod.rs5
2 files changed, 5 insertions, 8 deletions
diff --git a/library/core/src/alloc/global.rs b/library/core/src/alloc/global.rs
index c1bd896bdbc..6ec0f0b5ffc 100644
--- a/library/core/src/alloc/global.rs
+++ b/library/core/src/alloc/global.rs
@@ -55,14 +55,12 @@ use crate::ptr;
 ///   and implementors must ensure such contracts remain true.
 ///
 /// * You may not rely on allocations actually happening, even if there are explicit
-///   heap allocations in the source.
-///   The optimizer may detect unused allocations that it can either
+///   heap allocations in the source. The optimizer may detect unused allocations that it can either
 ///   eliminate entirely or move to the stack and thus never invoke the allocator. The
 ///   optimizer may further assume that allocation is infallible, so code that used to fail due
 ///   to allocator failures may now suddenly work because the optimizer worked around the
-///   need for an allocation.
-///   More concretely, the following code example is unsound, irrespective of whether your
-///   custom allocator allows counting how many allocations have happened.
+///   need for an allocation. More concretely, the following code example is unsound, irrespective
+///   of whether your custom allocator allows counting how many allocations have happened.
 ///
 ///   ```rust,ignore (unsound and has placeholders)
 ///   drop(Box::new(42));
diff --git a/library/core/src/alloc/mod.rs b/library/core/src/alloc/mod.rs
index 4aa166e6aa1..9c6e5738183 100644
--- a/library/core/src/alloc/mod.rs
+++ b/library/core/src/alloc/mod.rs
@@ -99,9 +99,8 @@ pub unsafe trait AllocRef {
     /// eliminate entirely or move to the stack and thus never invoke the allocator. The
     /// optimizer may further assume that allocation is infallible, so code that used to fail due
     /// to allocator failures may now suddenly work because the optimizer worked around the
-    /// need for an allocation.
-    /// More concretely, the following code example is unsound, irrespective of whether your
-    /// custom allocator allows counting how many allocations have happened.
+    /// need for an allocation. More concretely, the following code example is unsound, irrespective
+    /// of whether your custom allocator allows counting how many allocations have happened.
     ///
     /// ```rust,ignore (unsound and has placeholders)
     /// Global::dealloc(Global::alloc(some_layout));