Skip to content

Commit 3eb5731

Browse files
authored
Rollup merge of #108016 - tshepang:just-one-example, r=thomcc
"Basic usage" is redundant for there is just one example
2 parents 1f486f0 + ef6a59b commit 3eb5731

File tree

2 files changed

+0
-42
lines changed

2 files changed

+0
-42
lines changed

library/core/src/ptr/const_ptr.rs

-20
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ impl<T: ?Sized> *const T {
2323
///
2424
/// # Examples
2525
///
26-
/// Basic usage:
27-
///
2826
/// ```
2927
/// let s: &str = "Follow the rabbit";
3028
/// let ptr: *const u8 = s.as_ptr();
@@ -323,8 +321,6 @@ impl<T: ?Sized> *const T {
323321
///
324322
/// # Examples
325323
///
326-
/// Basic usage:
327-
///
328324
/// ```
329325
/// let ptr: *const u8 = &10u8 as *const u8;
330326
///
@@ -384,8 +380,6 @@ impl<T: ?Sized> *const T {
384380
///
385381
/// # Examples
386382
///
387-
/// Basic usage:
388-
///
389383
/// ```
390384
/// #![feature(ptr_as_uninit)]
391385
///
@@ -449,8 +443,6 @@ impl<T: ?Sized> *const T {
449443
///
450444
/// # Examples
451445
///
452-
/// Basic usage:
453-
///
454446
/// ```
455447
/// let s: &str = "123";
456448
/// let ptr: *const u8 = s.as_ptr();
@@ -526,8 +518,6 @@ impl<T: ?Sized> *const T {
526518
///
527519
/// # Examples
528520
///
529-
/// Basic usage:
530-
///
531521
/// ```
532522
/// // Iterate using a raw pointer in increments of two elements
533523
/// let data = [1u8, 2, 3, 4, 5];
@@ -908,8 +898,6 @@ impl<T: ?Sized> *const T {
908898
///
909899
/// # Examples
910900
///
911-
/// Basic usage:
912-
///
913901
/// ```
914902
/// let s: &str = "123";
915903
/// let ptr: *const u8 = s.as_ptr();
@@ -993,8 +981,6 @@ impl<T: ?Sized> *const T {
993981
///
994982
/// # Examples
995983
///
996-
/// Basic usage:
997-
///
998984
/// ```
999985
/// let s: &str = "123";
1000986
///
@@ -1072,8 +1058,6 @@ impl<T: ?Sized> *const T {
10721058
///
10731059
/// # Examples
10741060
///
1075-
/// Basic usage:
1076-
///
10771061
/// ```
10781062
/// // Iterate using a raw pointer in increments of two elements
10791063
/// let data = [1u8, 2, 3, 4, 5];
@@ -1152,8 +1136,6 @@ impl<T: ?Sized> *const T {
11521136
///
11531137
/// # Examples
11541138
///
1155-
/// Basic usage:
1156-
///
11571139
/// ```
11581140
/// // Iterate using a raw pointer in increments of two elements (backwards)
11591141
/// let data = [1u8, 2, 3, 4, 5];
@@ -1359,7 +1341,6 @@ impl<T: ?Sized> *const T {
13591341
///
13601342
/// # Examples
13611343
///
1362-
/// Basic usage:
13631344
/// ```
13641345
/// #![feature(pointer_is_aligned)]
13651346
/// #![feature(pointer_byte_offsets)]
@@ -1482,7 +1463,6 @@ impl<T: ?Sized> *const T {
14821463
///
14831464
/// # Examples
14841465
///
1485-
/// Basic usage:
14861466
/// ```
14871467
/// #![feature(pointer_is_aligned)]
14881468
/// #![feature(pointer_byte_offsets)]

library/core/src/ptr/mut_ptr.rs

-22
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ impl<T: ?Sized> *mut T {
2222
///
2323
/// # Examples
2424
///
25-
/// Basic usage:
26-
///
2725
/// ```
2826
/// let mut s = [1, 2, 3];
2927
/// let ptr: *mut u32 = s.as_mut_ptr();
@@ -332,8 +330,6 @@ impl<T: ?Sized> *mut T {
332330
///
333331
/// # Examples
334332
///
335-
/// Basic usage:
336-
///
337333
/// ```
338334
/// let ptr: *mut u8 = &mut 10u8 as *mut u8;
339335
///
@@ -396,8 +392,6 @@ impl<T: ?Sized> *mut T {
396392
///
397393
/// # Examples
398394
///
399-
/// Basic usage:
400-
///
401395
/// ```
402396
/// #![feature(ptr_as_uninit)]
403397
///
@@ -461,8 +455,6 @@ impl<T: ?Sized> *mut T {
461455
///
462456
/// # Examples
463457
///
464-
/// Basic usage:
465-
///
466458
/// ```
467459
/// let mut s = [1, 2, 3];
468460
/// let ptr: *mut u32 = s.as_mut_ptr();
@@ -539,8 +531,6 @@ impl<T: ?Sized> *mut T {
539531
///
540532
/// # Examples
541533
///
542-
/// Basic usage:
543-
///
544534
/// ```
545535
/// // Iterate using a raw pointer in increments of two elements
546536
/// let mut data = [1u8, 2, 3, 4, 5];
@@ -660,8 +650,6 @@ impl<T: ?Sized> *mut T {
660650
///
661651
/// # Examples
662652
///
663-
/// Basic usage:
664-
///
665653
/// ```
666654
/// let mut s = [1, 2, 3];
667655
/// let ptr: *mut u32 = s.as_mut_ptr();
@@ -1010,8 +998,6 @@ impl<T: ?Sized> *mut T {
1010998
///
1011999
/// # Examples
10121000
///
1013-
/// Basic usage:
1014-
///
10151001
/// ```
10161002
/// let s: &str = "123";
10171003
/// let ptr: *const u8 = s.as_ptr();
@@ -1095,8 +1081,6 @@ impl<T: ?Sized> *mut T {
10951081
///
10961082
/// # Examples
10971083
///
1098-
/// Basic usage:
1099-
///
11001084
/// ```
11011085
/// let s: &str = "123";
11021086
///
@@ -1174,8 +1158,6 @@ impl<T: ?Sized> *mut T {
11741158
///
11751159
/// # Examples
11761160
///
1177-
/// Basic usage:
1178-
///
11791161
/// ```
11801162
/// // Iterate using a raw pointer in increments of two elements
11811163
/// let data = [1u8, 2, 3, 4, 5];
@@ -1254,8 +1236,6 @@ impl<T: ?Sized> *mut T {
12541236
///
12551237
/// # Examples
12561238
///
1257-
/// Basic usage:
1258-
///
12591239
/// ```
12601240
/// // Iterate using a raw pointer in increments of two elements (backwards)
12611241
/// let data = [1u8, 2, 3, 4, 5];
@@ -1627,7 +1607,6 @@ impl<T: ?Sized> *mut T {
16271607
///
16281608
/// # Examples
16291609
///
1630-
/// Basic usage:
16311610
/// ```
16321611
/// #![feature(pointer_is_aligned)]
16331612
/// #![feature(pointer_byte_offsets)]
@@ -1752,7 +1731,6 @@ impl<T: ?Sized> *mut T {
17521731
///
17531732
/// # Examples
17541733
///
1755-
/// Basic usage:
17561734
/// ```
17571735
/// #![feature(pointer_is_aligned)]
17581736
/// #![feature(pointer_byte_offsets)]

0 commit comments

Comments
 (0)