@@ -57,7 +57,7 @@ pub use intrinsics::write_bytes;
57
57
/// `drop_in_place` is unsafe because it dereferences a raw pointer. The caller
58
58
/// must ensure that the pointer points to a valid value of type `T`.
59
59
///
60
- /// # [ Undefined Behavior]
60
+ /// # Undefined Behavior
61
61
///
62
62
/// Behavior is undefined if any of the following conditions are violated:
63
63
///
@@ -73,7 +73,6 @@ pub use intrinsics::write_bytes;
73
73
///
74
74
/// [`Copy`]: ../marker/trait.Copy.html
75
75
/// [`write`]: ./fn.write.html
76
- /// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
77
76
///
78
77
/// # Examples
79
78
///
@@ -157,16 +156,14 @@ pub const fn null_mut<T>() -> *mut T { 0 as *mut T }
157
156
/// `swap` is unsafe because it dereferences a raw pointer. The caller must
158
157
/// ensure that both pointers point to valid values of type `T`.
159
158
///
160
- /// # [ Undefined Behavior]
159
+ /// # Undefined Behavior
161
160
///
162
161
/// Behavior is undefined if any of the following conditions are violated:
163
162
///
164
163
/// * `x` and `y` must point to valid, initialized memory.
165
164
///
166
165
/// * `x` and `y` must be properly aligned.
167
166
///
168
- /// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
169
- ///
170
167
/// # Examples
171
168
///
172
169
/// Swapping two non-overlapping regions:
@@ -317,16 +314,14 @@ unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, len: usize) {
317
314
///
318
315
/// [`mem::replace`]: ../mem/fn.replace.html
319
316
///
320
- /// # [ Undefined Behavior]
317
+ /// # Undefined Behavior
321
318
///
322
319
/// Behavior is undefined if any of the following conditions are violated:
323
320
///
324
321
/// * `dest` must point to valid, initialized memory.
325
322
///
326
323
/// * `dest` must be properly aligned.
327
324
///
328
- /// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
329
- ///
330
325
/// # Examples
331
326
///
332
327
/// ```
@@ -358,7 +353,7 @@ pub unsafe fn replace<T>(dest: *mut T, mut src: T) -> T {
358
353
/// `read` is unsafe because it dereferences a raw pointer. The caller
359
354
/// must ensure that the pointer points to a valid value of type `T`.
360
355
///
361
- /// # [ Undefined Behavior]
356
+ /// # Undefined Behavior
362
357
///
363
358
/// Behavior is undefined if any of the following conditions are violated:
364
359
///
@@ -377,7 +372,6 @@ pub unsafe fn replace<T>(dest: *mut T, mut src: T) -> T {
377
372
/// [`Copy`]: ../marker/trait.Copy.html
378
373
/// [`read_unaligned`]: ./fn.read_unaligned.html
379
374
/// [`write`]: ./fn.write.html
380
- /// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
381
375
///
382
376
/// # Examples
383
377
///
@@ -447,7 +441,7 @@ pub unsafe fn read<T>(src: *const T) -> T {
447
441
/// `read_unaligned` is unsafe because it dereferences a raw pointer. The caller
448
442
/// must ensure that the pointer points to a valid value of type `T`.
449
443
///
450
- /// # [ Undefined Behavior]
444
+ /// # Undefined Behavior
451
445
///
452
446
/// Behavior is undefined if any of the following conditions are violated:
453
447
///
@@ -463,7 +457,6 @@ pub unsafe fn read<T>(src: *const T) -> T {
463
457
///
464
458
/// [`Copy`]: ../marker/trait.Copy.html
465
459
/// [`write_unaligned`]: ./fn.write_unaligned.html
466
- /// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
467
460
///
468
461
/// # Examples
469
462
///
@@ -530,7 +523,7 @@ pub unsafe fn read_unaligned<T>(src: *const T) -> T {
530
523
///
531
524
/// `write` is unsafe because it dereferences a raw pointer.
532
525
///
533
- /// # [ Undefined Behavior]
526
+ /// # Undefined Behavior
534
527
///
535
528
/// `write` can trigger undefined behavior if any of the following conditions
536
529
/// are violated:
@@ -540,7 +533,6 @@ pub unsafe fn read_unaligned<T>(src: *const T) -> T {
540
533
/// * `dst` must be properly aligned. Use [`write_unaligned`] if this is not the
541
534
/// case.
542
535
///
543
- /// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
544
536
/// [`write_unaligned`]: ./fn.write_unaligned.html
545
537
///
546
538
/// # Examples
@@ -609,15 +601,13 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
609
601
///
610
602
/// `write_unaligned` is unsafe because it dereferences a raw pointer.
611
603
///
612
- /// # [ Undefined Behavior]
604
+ /// # Undefined Behavior
613
605
///
614
606
/// `write_unaligned` can trigger undefined behavior if any of the following
615
607
/// conditions are violated:
616
608
///
617
609
/// * `dst` must point to valid memory.
618
610
///
619
- /// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
620
- ///
621
611
/// # Examples
622
612
///
623
613
/// Access fields in a packed struct:
@@ -684,7 +674,7 @@ pub unsafe fn write_unaligned<T>(dst: *mut T, src: T) {
684
674
/// `read_volatile` is unsafe because it dereferences a raw pointer. The caller
685
675
/// must ensure that the pointer points to a valid value of type `T`.
686
676
///
687
- /// # [ Undefined Behavior]
677
+ /// # Undefined Behavior
688
678
///
689
679
/// Behavior is undefined if any of the following conditions are violated:
690
680
///
@@ -702,7 +692,6 @@ pub unsafe fn write_unaligned<T>(dst: *mut T, src: T) {
702
692
///
703
693
/// [`Copy`]: ../marker/trait.Copy.html
704
694
/// [`write_volatile`]: ./fn.write_volatile.html
705
- /// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
706
695
///
707
696
/// # Examples
708
697
///
@@ -754,7 +743,7 @@ pub unsafe fn read_volatile<T>(src: *const T) -> T {
754
743
///
755
744
/// `write_volatile` is unsafe because it dereferences a raw pointer.
756
745
///
757
- /// # [ Undefined Behavior]
746
+ /// # Undefined Behavior
758
747
///
759
748
/// `write_volatile` can trigger undefined behavior if any of the following
760
749
/// conditions are violated:
@@ -763,8 +752,6 @@ pub unsafe fn read_volatile<T>(src: *const T) -> T {
763
752
///
764
753
/// * `dst` must be properly aligned.
765
754
///
766
- /// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
767
- ///
768
755
/// # Examples
769
756
///
770
757
/// Basic usage:
0 commit comments