]> git.lizzy.rs Git - rust.git/commitdiff
Don't link "Undefined Behavior" heading
authorDylan MacKenzie <ecstaticmorse@gmail.com>
Sun, 8 Apr 2018 00:22:27 +0000 (17:22 -0700)
committerDylan MacKenzie <ecstaticmorse@gmail.com>
Sun, 8 Apr 2018 00:22:27 +0000 (17:22 -0700)
The rendered version does not make clear that this is a link to another
page, and it breaks the anchor link.

src/libcore/intrinsics.rs
src/libcore/ptr.rs

index 8e3180cd2a6f96b9f8e1850e2c3db9eaf3efc753..daa43337fd79ca509246502db5780d13607c5733 100644 (file)
     /// The caller must ensure that `src` points to a valid sequence of type
     /// `T`.
     ///
-    /// # [Undefined Behavior]
+    /// # Undefined Behavior
     ///
     /// Behavior is undefined if any of the following conditions are violated:
     ///
     /// copies of `T`, regardless of whether `T: Copy`, which can result in
     /// undefined behavior if both copies are used.
     ///
-    /// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
-    ///
     /// # Examples
     ///
     /// Manually implement [`Vec::append`]:
     /// `copy` is unsafe because it dereferences a raw pointer. The caller must
     /// ensure that `src` points to a valid sequence of type `T`.
     ///
-    /// # [Undefined Behavior]
+    /// # Undefined Behavior
     ///
     /// Behavior is undefined if any of the following conditions are violated:
     ///
     /// can result in undefined behavior if both copies are used.
     ///
     /// [`Copy`]: ../marker/trait.Copy.html
-    /// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
     ///
     /// # Examples
     ///
     /// `write_bytes` is unsafe because it dereferences a raw pointer. The
     /// caller must ensure that the poiinter points to a valid value of type `T`.
     ///
-    /// # [Undefined Behavior]
+    /// # Undefined Behavior
     ///
     /// Behavior is undefined if any of the following conditions are violated:
     ///
index 9069feab06c84b07b94e0d785575f31014efe636..4cb9c655441d917401732a2bfad578f50fd8f052 100644 (file)
@@ -57,7 +57,7 @@
 /// `drop_in_place` is unsafe because it dereferences a raw pointer. The caller
 /// must ensure that the pointer points to a valid value of type `T`.
 ///
-/// # [Undefined Behavior]
+/// # Undefined Behavior
 ///
 /// Behavior is undefined if any of the following conditions are violated:
 ///
@@ -73,7 +73,6 @@
 ///
 /// [`Copy`]: ../marker/trait.Copy.html
 /// [`write`]: ./fn.write.html
-/// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
 ///
 /// # Examples
 ///
@@ -157,7 +156,7 @@ pub const fn null_mut<T>() -> *mut T { 0 as *mut T }
 /// `swap` is unsafe because it dereferences a raw pointer. The caller must
 /// ensure that both pointers point to valid values of type `T`.
 ///
-/// # [Undefined Behavior]
+/// # Undefined Behavior
 ///
 /// Behavior is undefined if any of the following conditions are violated:
 ///
@@ -165,8 +164,6 @@ pub const fn null_mut<T>() -> *mut T { 0 as *mut T }
 ///
 /// * `x` and `y` must be properly aligned.
 ///
-/// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
-///
 /// # Examples
 ///
 /// Swapping two non-overlapping regions:
@@ -317,7 +314,7 @@ unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, len: usize) {
 ///
 /// [`mem::replace`]: ../mem/fn.replace.html
 ///
-/// # [Undefined Behavior]
+/// # Undefined Behavior
 ///
 /// Behavior is undefined if any of the following conditions are violated:
 ///
@@ -325,8 +322,6 @@ unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, len: usize) {
 ///
 /// * `dest` must be properly aligned.
 ///
-/// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
-///
 /// # Examples
 ///
 /// ```
@@ -358,7 +353,7 @@ pub unsafe fn replace<T>(dest: *mut T, mut src: T) -> T {
 /// `read` is unsafe because it dereferences a raw pointer. The caller
 /// must ensure that the pointer points to a valid value of type `T`.
 ///
-/// # [Undefined Behavior]
+/// # Undefined Behavior
 ///
 /// Behavior is undefined if any of the following conditions are violated:
 ///
@@ -377,7 +372,6 @@ pub unsafe fn replace<T>(dest: *mut T, mut src: T) -> T {
 /// [`Copy`]: ../marker/trait.Copy.html
 /// [`read_unaligned`]: ./fn.read_unaligned.html
 /// [`write`]: ./fn.write.html
-/// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
 ///
 /// # Examples
 ///
@@ -447,7 +441,7 @@ pub unsafe fn read<T>(src: *const T) -> T {
 /// `read_unaligned` is unsafe because it dereferences a raw pointer. The caller
 /// must ensure that the pointer points to a valid value of type `T`.
 ///
-/// # [Undefined Behavior]
+/// # Undefined Behavior
 ///
 /// Behavior is undefined if any of the following conditions are violated:
 ///
@@ -463,7 +457,6 @@ pub unsafe fn read<T>(src: *const T) -> T {
 ///
 /// [`Copy`]: ../marker/trait.Copy.html
 /// [`write_unaligned`]: ./fn.write_unaligned.html
-/// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
 ///
 /// # Examples
 ///
@@ -530,7 +523,7 @@ pub unsafe fn read_unaligned<T>(src: *const T) -> T {
 ///
 /// `write` is unsafe because it dereferences a raw pointer.
 ///
-/// # [Undefined Behavior]
+/// # Undefined Behavior
 ///
 /// `write` can trigger undefined behavior if any of the following conditions
 /// are violated:
@@ -540,7 +533,6 @@ pub unsafe fn read_unaligned<T>(src: *const T) -> T {
 /// * `dst` must be properly aligned. Use [`write_unaligned`] if this is not the
 ///   case.
 ///
-/// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
 /// [`write_unaligned`]: ./fn.write_unaligned.html
 ///
 /// # Examples
@@ -609,15 +601,13 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
 ///
 /// `write_unaligned` is unsafe because it dereferences a raw pointer.
 ///
-/// # [Undefined Behavior]
+/// # Undefined Behavior
 ///
 /// `write_unaligned` can trigger undefined behavior if any of the following
 /// conditions are violated:
 ///
 /// * `dst` must point to valid memory.
 ///
-/// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
-///
 /// # Examples
 ///
 /// Access fields in a packed struct:
@@ -684,7 +674,7 @@ pub unsafe fn write_unaligned<T>(dst: *mut T, src: T) {
 /// `read_volatile` is unsafe because it dereferences a raw pointer. The caller
 /// must ensure that the pointer points to a valid value of type `T`.
 ///
-/// # [Undefined Behavior]
+/// # Undefined Behavior
 ///
 /// Behavior is undefined if any of the following conditions are violated:
 ///
@@ -702,7 +692,6 @@ pub unsafe fn write_unaligned<T>(dst: *mut T, src: T) {
 ///
 /// [`Copy`]: ../marker/trait.Copy.html
 /// [`write_volatile`]: ./fn.write_volatile.html
-/// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
 ///
 /// # Examples
 ///
@@ -754,7 +743,7 @@ pub unsafe fn read_volatile<T>(src: *const T) -> T {
 ///
 /// `write_volatile` is unsafe because it dereferences a raw pointer.
 ///
-/// # [Undefined Behavior]
+/// # Undefined Behavior
 ///
 /// `write_volatile` can trigger undefined behavior if any of the following
 /// conditions are violated:
@@ -763,8 +752,6 @@ pub unsafe fn read_volatile<T>(src: *const T) -> T {
 ///
 /// * `dst` must be properly aligned.
 ///
-/// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
-///
 /// # Examples
 ///
 /// Basic usage: