Skip to content

Commit b6c54a9

Browse files
committed
Avoid placing // FIXME comments inside doc code blocks
This leads tools like rustfmt to get confused, because the doc code block effectively spans two doc comments. As a result, the tools think the first code block is unclosed, and the subsequent terminator opens a new block. Move the FIXME comments outside the doc code blocks, instead.
1 parent 7150880 commit b6c54a9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

library/alloc/src/string.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,12 @@ use crate::vec::{self, Vec};
265265
/// You can look at these with the [`as_ptr`], [`len`], and [`capacity`]
266266
/// methods:
267267
///
268+
// FIXME Update this when vec_into_raw_parts is stabilized
268269
/// ```
269270
/// use std::mem;
270271
///
271272
/// let story = String::from("Once upon a time...");
272273
///
273-
// FIXME Update this when vec_into_raw_parts is stabilized
274274
/// // Prevent automatically dropping the String's data
275275
/// let mut story = mem::ManuallyDrop::new(story);
276276
///
@@ -970,13 +970,13 @@ impl String {
970970
///
971971
/// # Examples
972972
///
973+
// FIXME Update this when vec_into_raw_parts is stabilized
973974
/// ```
974975
/// use std::mem;
975976
///
976977
/// unsafe {
977978
/// let s = String::from("hello");
978979
///
979-
// FIXME Update this when vec_into_raw_parts is stabilized
980980
/// // Prevent automatically dropping the String's data
981981
/// let mut s = mem::ManuallyDrop::new(s);
982982
///

library/alloc/src/vec/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -566,13 +566,13 @@ impl<T> Vec<T> {
566566
///
567567
/// # Examples
568568
///
569+
// FIXME Update this when vec_into_raw_parts is stabilized
569570
/// ```
570571
/// use std::ptr;
571572
/// use std::mem;
572573
///
573574
/// let v = vec![1, 2, 3];
574575
///
575-
// FIXME Update this when vec_into_raw_parts is stabilized
576576
/// // Prevent running `v`'s destructor so we are in complete control
577577
/// // of the allocation.
578578
/// let mut v = mem::ManuallyDrop::new(v);
@@ -674,6 +674,7 @@ impl<T> Vec<T> {
674674
///
675675
/// # Examples
676676
///
677+
// FIXME Update this when vec_into_raw_parts is stabilized
677678
/// ```
678679
/// #![feature(box_vec_non_null)]
679680
///
@@ -682,7 +683,6 @@ impl<T> Vec<T> {
682683
///
683684
/// let v = vec![1, 2, 3];
684685
///
685-
// FIXME Update this when vec_into_raw_parts is stabilized
686686
/// // Prevent running `v`'s destructor so we are in complete control
687687
/// // of the allocation.
688688
/// let mut v = mem::ManuallyDrop::new(v);
@@ -994,6 +994,7 @@ impl<T, A: Allocator> Vec<T, A> {
994994
///
995995
/// # Examples
996996
///
997+
// FIXME Update this when vec_into_raw_parts is stabilized
997998
/// ```
998999
/// #![feature(allocator_api)]
9991000
///
@@ -1007,7 +1008,6 @@ impl<T, A: Allocator> Vec<T, A> {
10071008
/// v.push(2);
10081009
/// v.push(3);
10091010
///
1010-
// FIXME Update this when vec_into_raw_parts is stabilized
10111011
/// // Prevent running `v`'s destructor so we are in complete control
10121012
/// // of the allocation.
10131013
/// let mut v = mem::ManuallyDrop::new(v);
@@ -1114,6 +1114,7 @@ impl<T, A: Allocator> Vec<T, A> {
11141114
///
11151115
/// # Examples
11161116
///
1117+
// FIXME Update this when vec_into_raw_parts is stabilized
11171118
/// ```
11181119
/// #![feature(allocator_api, box_vec_non_null)]
11191120
///
@@ -1127,7 +1128,6 @@ impl<T, A: Allocator> Vec<T, A> {
11271128
/// v.push(2);
11281129
/// v.push(3);
11291130
///
1130-
// FIXME Update this when vec_into_raw_parts is stabilized
11311131
/// // Prevent running `v`'s destructor so we are in complete control
11321132
/// // of the allocation.
11331133
/// let mut v = mem::ManuallyDrop::new(v);

library/core/src/primitive_docs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ mod prim_bool {}
271271
/// When the compiler sees a value of type `!` in a [coercion site], it implicitly inserts a
272272
/// coercion to allow the type checker to infer any type:
273273
///
274+
// FIXME: use `core::convert::absurd` here instead, once it's merged
274275
/// ```rust,ignore (illustrative-and-has-placeholders)
275276
/// // this
276277
/// let x: u8 = panic!();
@@ -281,7 +282,6 @@ mod prim_bool {}
281282
/// // where absurd is a function with the following signature
282283
/// // (it's sound, because `!` always marks unreachable code):
283284
/// fn absurd<T>(_: !) -> T { ... }
284-
// FIXME: use `core::convert::absurd` here instead, once it's merged
285285
/// ```
286286
///
287287
/// This can lead to compilation errors if the type cannot be inferred:

0 commit comments

Comments
 (0)