From 232e3d04b359a5867b530f26698f986ba1732d85 Mon Sep 17 00:00:00 2001 From: Prabakaran Kumaresshan <4676330+nixphix@users.noreply.github.com> Date: Fri, 14 Aug 2020 21:09:35 +0530 Subject: [PATCH 1/2] Switch to intra-doc links in os/raw/*.md --- library/std/src/os/raw/char.md | 8 ++++---- library/std/src/os/raw/double.md | 4 ++-- library/std/src/os/raw/float.md | 2 +- library/std/src/os/raw/int.md | 6 +++--- library/std/src/os/raw/long.md | 6 +++--- library/std/src/os/raw/longlong.md | 6 +++--- library/std/src/os/raw/schar.md | 4 ++-- library/std/src/os/raw/short.md | 4 ++-- library/std/src/os/raw/uchar.md | 4 ++-- library/std/src/os/raw/uint.md | 6 +++--- library/std/src/os/raw/ulong.md | 6 +++--- library/std/src/os/raw/ulonglong.md | 6 +++--- library/std/src/os/raw/ushort.md | 4 ++-- 13 files changed, 33 insertions(+), 33 deletions(-) diff --git a/library/std/src/os/raw/char.md b/library/std/src/os/raw/char.md index 9a55767d965a6..9fb0aed89d885 100644 --- a/library/std/src/os/raw/char.md +++ b/library/std/src/os/raw/char.md @@ -5,7 +5,7 @@ Equivalent to C's `char` type. C chars are most commonly used to make C strings. Unlike Rust, where the length of a string is included alongside the string, C strings mark the end of a string with the character `'\0'`. See [`CStr`] for more information. [C's `char` type]: https://en.wikipedia.org/wiki/C_data_types#Basic_types -[Rust's `char` type]: ../../primitive.char.html -[`CStr`]: ../../ffi/struct.CStr.html -[`i8`]: ../../primitive.i8.html -[`u8`]: ../../primitive.u8.html +[Rust's `char` type]: char +[`CStr`]: crate::ffi::CStr +[`i8`]: i8 +[`u8`]: u8 diff --git a/library/std/src/os/raw/double.md b/library/std/src/os/raw/double.md index 6818dada31793..51503b5bd69dc 100644 --- a/library/std/src/os/raw/double.md +++ b/library/std/src/os/raw/double.md @@ -3,5 +3,5 @@ Equivalent to C's `double` type. This type will almost always be [`f64`], which is guaranteed to be an [IEEE-754 double-precision float] in Rust. That said, the standard technically only guarantees that it be a floating-point number with at least the precision of a [`float`], and it may be `f32` or something entirely different from the IEEE-754 standard. [IEEE-754 double-precision float]: https://en.wikipedia.org/wiki/IEEE_754 -[`float`]: type.c_float.html -[`f64`]: ../../primitive.f64.html +[`float`]: c_float +[`f64`]: f64 diff --git a/library/std/src/os/raw/float.md b/library/std/src/os/raw/float.md index 57d1071d0da17..7483b97623e7c 100644 --- a/library/std/src/os/raw/float.md +++ b/library/std/src/os/raw/float.md @@ -3,4 +3,4 @@ Equivalent to C's `float` type. This type will almost always be [`f32`], which is guaranteed to be an [IEEE-754 single-precision float] in Rust. That said, the standard technically only guarantees that it be a floating-point number, and it may have less precision than `f32` or not follow the IEEE-754 standard at all. [IEEE-754 single-precision float]: https://en.wikipedia.org/wiki/IEEE_754 -[`f32`]: ../../primitive.f32.html +[`f32`]: f32 diff --git a/library/std/src/os/raw/int.md b/library/std/src/os/raw/int.md index a0d25fd21d89f..9860e4782f335 100644 --- a/library/std/src/os/raw/int.md +++ b/library/std/src/os/raw/int.md @@ -2,6 +2,6 @@ Equivalent to C's `signed int` (`int`) type. This type will almost always be [`i32`], but may differ on some esoteric systems. The C standard technically only requires that this type be a signed integer that is at least the size of a [`short`]; some systems define it as an [`i16`], for example. -[`short`]: type.c_short.html -[`i32`]: ../../primitive.i32.html -[`i16`]: ../../primitive.i16.html +[`short`]: c_short +[`i32`]: i32 +[`i16`]: i16 diff --git a/library/std/src/os/raw/long.md b/library/std/src/os/raw/long.md index c620b402819fd..410100ac64aba 100644 --- a/library/std/src/os/raw/long.md +++ b/library/std/src/os/raw/long.md @@ -2,6 +2,6 @@ Equivalent to C's `signed long` (`long`) type. This type will always be [`i32`] or [`i64`]. Most notably, many Linux-based systems assume an `i64`, but Windows assumes `i32`. The C standard technically only requires that this type be a signed integer that is at least 32 bits and at least the size of an [`int`], although in practice, no system would have a `long` that is neither an `i32` nor `i64`. -[`int`]: type.c_int.html -[`i32`]: ../../primitive.i32.html -[`i64`]: ../../primitive.i64.html +[`int`]: c_int +[`i32`]: i32 +[`i64`]: i64 diff --git a/library/std/src/os/raw/longlong.md b/library/std/src/os/raw/longlong.md index ab3d6436568df..26463dc8ec003 100644 --- a/library/std/src/os/raw/longlong.md +++ b/library/std/src/os/raw/longlong.md @@ -2,6 +2,6 @@ Equivalent to C's `signed long long` (`long long`) type. This type will almost always be [`i64`], but may differ on some systems. The C standard technically only requires that this type be a signed integer that is at least 64 bits and at least the size of a [`long`], although in practice, no system would have a `long long` that is not an `i64`, as most systems do not have a standardised [`i128`] type. -[`long`]: type.c_int.html -[`i64`]: ../../primitive.i64.html -[`i128`]: ../../primitive.i128.html +[`long`]: c_int +[`i64`]: i64 +[`i128`]: i128 diff --git a/library/std/src/os/raw/schar.md b/library/std/src/os/raw/schar.md index 6aa8b1211d808..cc8d9bf5f42ec 100644 --- a/library/std/src/os/raw/schar.md +++ b/library/std/src/os/raw/schar.md @@ -2,5 +2,5 @@ Equivalent to C's `signed char` type. This type will always be [`i8`], but is included for completeness. It is defined as being a signed integer the same size as a C [`char`]. -[`char`]: type.c_char.html -[`i8`]: ../../primitive.i8.html +[`char`]: c_char +[`i8`]: i8 diff --git a/library/std/src/os/raw/short.md b/library/std/src/os/raw/short.md index be92c6c106d59..f2d25e387e2b3 100644 --- a/library/std/src/os/raw/short.md +++ b/library/std/src/os/raw/short.md @@ -2,5 +2,5 @@ Equivalent to C's `signed short` (`short`) type. This type will almost always be [`i16`], but may differ on some esoteric systems. The C standard technically only requires that this type be a signed integer with at least 16 bits; some systems may define it as `i32`, for example. -[`char`]: type.c_char.html -[`i16`]: ../../primitive.i16.html +[`char`]: c_char +[`i16`]: i16 diff --git a/library/std/src/os/raw/uchar.md b/library/std/src/os/raw/uchar.md index b6ca711f86934..462410820dc6a 100644 --- a/library/std/src/os/raw/uchar.md +++ b/library/std/src/os/raw/uchar.md @@ -2,5 +2,5 @@ Equivalent to C's `unsigned char` type. This type will always be [`u8`], but is included for completeness. It is defined as being an unsigned integer the same size as a C [`char`]. -[`char`]: type.c_char.html -[`u8`]: ../../primitive.u8.html +[`char`]: c_char +[`u8`]: u8 diff --git a/library/std/src/os/raw/uint.md b/library/std/src/os/raw/uint.md index 6f7013a8ac18d..4a5c4ab1d4893 100644 --- a/library/std/src/os/raw/uint.md +++ b/library/std/src/os/raw/uint.md @@ -2,6 +2,6 @@ Equivalent to C's `unsigned int` type. This type will almost always be [`u32`], but may differ on some esoteric systems. The C standard technically only requires that this type be an unsigned integer with the same size as an [`int`]; some systems define it as a [`u16`], for example. -[`int`]: type.c_int.html -[`u32`]: ../../primitive.u32.html -[`u16`]: ../../primitive.u16.html +[`int`]: c_int +[`u32`]: u32 +[`u16`]: u16 diff --git a/library/std/src/os/raw/ulong.md b/library/std/src/os/raw/ulong.md index c350395080e80..745759c51abdc 100644 --- a/library/std/src/os/raw/ulong.md +++ b/library/std/src/os/raw/ulong.md @@ -2,6 +2,6 @@ Equivalent to C's `unsigned long` type. This type will always be [`u32`] or [`u64`]. Most notably, many Linux-based systems assume an `u64`, but Windows assumes `u32`. The C standard technically only requires that this type be an unsigned integer with the size of a [`long`], although in practice, no system would have a `ulong` that is neither a `u32` nor `u64`. -[`long`]: type.c_long.html -[`u32`]: ../../primitive.u32.html -[`u64`]: ../../primitive.u64.html +[`long`]: c_long +[`u32`]: u32 +[`u64`]: u64 diff --git a/library/std/src/os/raw/ulonglong.md b/library/std/src/os/raw/ulonglong.md index c41faf74c5c68..981106b23b6a4 100644 --- a/library/std/src/os/raw/ulonglong.md +++ b/library/std/src/os/raw/ulonglong.md @@ -2,6 +2,6 @@ Equivalent to C's `unsigned long long` type. This type will almost always be [`u64`], but may differ on some systems. The C standard technically only requires that this type be an unsigned integer with the size of a [`long long`], although in practice, no system would have a `long long` that is not a `u64`, as most systems do not have a standardised [`u128`] type. -[`long long`]: type.c_longlong.html -[`u64`]: ../../primitive.u64.html -[`u128`]: ../../primitive.u128.html +[`long long`]: c_longlong +[`u64`]: u64 +[`u128`]: u128 diff --git a/library/std/src/os/raw/ushort.md b/library/std/src/os/raw/ushort.md index d364abb3c8e0c..6e2506d52cf84 100644 --- a/library/std/src/os/raw/ushort.md +++ b/library/std/src/os/raw/ushort.md @@ -2,5 +2,5 @@ Equivalent to C's `unsigned short` type. This type will almost always be [`u16`], but may differ on some esoteric systems. The C standard technically only requires that this type be an unsigned integer with the same size as a [`short`]. -[`short`]: type.c_short.html -[`u16`]: ../../primitive.u16.html +[`short`]: c_short +[`u16`]: u16 From 84539eb7b5de1b15467c591dcfb272fefa488bc8 Mon Sep 17 00:00:00 2001 From: Prabakaran Kumaresshan <4676330+nixphix@users.noreply.github.com> Date: Fri, 14 Aug 2020 21:57:42 +0530 Subject: [PATCH 2/2] remove primitive type links --- library/std/src/os/raw/char.md | 2 -- library/std/src/os/raw/double.md | 1 - library/std/src/os/raw/float.md | 1 - library/std/src/os/raw/int.md | 2 -- library/std/src/os/raw/long.md | 2 -- library/std/src/os/raw/longlong.md | 2 -- library/std/src/os/raw/schar.md | 1 - library/std/src/os/raw/short.md | 1 - library/std/src/os/raw/uchar.md | 1 - library/std/src/os/raw/uint.md | 2 -- library/std/src/os/raw/ulong.md | 2 -- library/std/src/os/raw/ulonglong.md | 2 -- library/std/src/os/raw/ushort.md | 1 - 13 files changed, 20 deletions(-) diff --git a/library/std/src/os/raw/char.md b/library/std/src/os/raw/char.md index 9fb0aed89d885..8256b725acfa3 100644 --- a/library/std/src/os/raw/char.md +++ b/library/std/src/os/raw/char.md @@ -7,5 +7,3 @@ C chars are most commonly used to make C strings. Unlike Rust, where the length [C's `char` type]: https://en.wikipedia.org/wiki/C_data_types#Basic_types [Rust's `char` type]: char [`CStr`]: crate::ffi::CStr -[`i8`]: i8 -[`u8`]: u8 diff --git a/library/std/src/os/raw/double.md b/library/std/src/os/raw/double.md index 51503b5bd69dc..57f4534829ec8 100644 --- a/library/std/src/os/raw/double.md +++ b/library/std/src/os/raw/double.md @@ -4,4 +4,3 @@ This type will almost always be [`f64`], which is guaranteed to be an [IEEE-754 [IEEE-754 double-precision float]: https://en.wikipedia.org/wiki/IEEE_754 [`float`]: c_float -[`f64`]: f64 diff --git a/library/std/src/os/raw/float.md b/library/std/src/os/raw/float.md index 7483b97623e7c..61e2abc05189d 100644 --- a/library/std/src/os/raw/float.md +++ b/library/std/src/os/raw/float.md @@ -3,4 +3,3 @@ Equivalent to C's `float` type. This type will almost always be [`f32`], which is guaranteed to be an [IEEE-754 single-precision float] in Rust. That said, the standard technically only guarantees that it be a floating-point number, and it may have less precision than `f32` or not follow the IEEE-754 standard at all. [IEEE-754 single-precision float]: https://en.wikipedia.org/wiki/IEEE_754 -[`f32`]: f32 diff --git a/library/std/src/os/raw/int.md b/library/std/src/os/raw/int.md index 9860e4782f335..8062ff2307a95 100644 --- a/library/std/src/os/raw/int.md +++ b/library/std/src/os/raw/int.md @@ -3,5 +3,3 @@ Equivalent to C's `signed int` (`int`) type. This type will almost always be [`i32`], but may differ on some esoteric systems. The C standard technically only requires that this type be a signed integer that is at least the size of a [`short`]; some systems define it as an [`i16`], for example. [`short`]: c_short -[`i32`]: i32 -[`i16`]: i16 diff --git a/library/std/src/os/raw/long.md b/library/std/src/os/raw/long.md index 410100ac64aba..cc160783f78b7 100644 --- a/library/std/src/os/raw/long.md +++ b/library/std/src/os/raw/long.md @@ -3,5 +3,3 @@ Equivalent to C's `signed long` (`long`) type. This type will always be [`i32`] or [`i64`]. Most notably, many Linux-based systems assume an `i64`, but Windows assumes `i32`. The C standard technically only requires that this type be a signed integer that is at least 32 bits and at least the size of an [`int`], although in practice, no system would have a `long` that is neither an `i32` nor `i64`. [`int`]: c_int -[`i32`]: i32 -[`i64`]: i64 diff --git a/library/std/src/os/raw/longlong.md b/library/std/src/os/raw/longlong.md index 26463dc8ec003..49c61bd61f4ad 100644 --- a/library/std/src/os/raw/longlong.md +++ b/library/std/src/os/raw/longlong.md @@ -3,5 +3,3 @@ Equivalent to C's `signed long long` (`long long`) type. This type will almost always be [`i64`], but may differ on some systems. The C standard technically only requires that this type be a signed integer that is at least 64 bits and at least the size of a [`long`], although in practice, no system would have a `long long` that is not an `i64`, as most systems do not have a standardised [`i128`] type. [`long`]: c_int -[`i64`]: i64 -[`i128`]: i128 diff --git a/library/std/src/os/raw/schar.md b/library/std/src/os/raw/schar.md index cc8d9bf5f42ec..69879c9f17f4d 100644 --- a/library/std/src/os/raw/schar.md +++ b/library/std/src/os/raw/schar.md @@ -3,4 +3,3 @@ Equivalent to C's `signed char` type. This type will always be [`i8`], but is included for completeness. It is defined as being a signed integer the same size as a C [`char`]. [`char`]: c_char -[`i8`]: i8 diff --git a/library/std/src/os/raw/short.md b/library/std/src/os/raw/short.md index f2d25e387e2b3..3d1e53d1325f3 100644 --- a/library/std/src/os/raw/short.md +++ b/library/std/src/os/raw/short.md @@ -3,4 +3,3 @@ Equivalent to C's `signed short` (`short`) type. This type will almost always be [`i16`], but may differ on some esoteric systems. The C standard technically only requires that this type be a signed integer with at least 16 bits; some systems may define it as `i32`, for example. [`char`]: c_char -[`i16`]: i16 diff --git a/library/std/src/os/raw/uchar.md b/library/std/src/os/raw/uchar.md index 462410820dc6a..b633bb7f8dacf 100644 --- a/library/std/src/os/raw/uchar.md +++ b/library/std/src/os/raw/uchar.md @@ -3,4 +3,3 @@ Equivalent to C's `unsigned char` type. This type will always be [`u8`], but is included for completeness. It is defined as being an unsigned integer the same size as a C [`char`]. [`char`]: c_char -[`u8`]: u8 diff --git a/library/std/src/os/raw/uint.md b/library/std/src/os/raw/uint.md index 4a5c4ab1d4893..f3abea35937ab 100644 --- a/library/std/src/os/raw/uint.md +++ b/library/std/src/os/raw/uint.md @@ -3,5 +3,3 @@ Equivalent to C's `unsigned int` type. This type will almost always be [`u32`], but may differ on some esoteric systems. The C standard technically only requires that this type be an unsigned integer with the same size as an [`int`]; some systems define it as a [`u16`], for example. [`int`]: c_int -[`u32`]: u32 -[`u16`]: u16 diff --git a/library/std/src/os/raw/ulong.md b/library/std/src/os/raw/ulong.md index 745759c51abdc..4ab304e657773 100644 --- a/library/std/src/os/raw/ulong.md +++ b/library/std/src/os/raw/ulong.md @@ -3,5 +3,3 @@ Equivalent to C's `unsigned long` type. This type will always be [`u32`] or [`u64`]. Most notably, many Linux-based systems assume an `u64`, but Windows assumes `u32`. The C standard technically only requires that this type be an unsigned integer with the size of a [`long`], although in practice, no system would have a `ulong` that is neither a `u32` nor `u64`. [`long`]: c_long -[`u32`]: u32 -[`u64`]: u64 diff --git a/library/std/src/os/raw/ulonglong.md b/library/std/src/os/raw/ulonglong.md index 981106b23b6a4..a27d70e17537d 100644 --- a/library/std/src/os/raw/ulonglong.md +++ b/library/std/src/os/raw/ulonglong.md @@ -3,5 +3,3 @@ Equivalent to C's `unsigned long long` type. This type will almost always be [`u64`], but may differ on some systems. The C standard technically only requires that this type be an unsigned integer with the size of a [`long long`], although in practice, no system would have a `long long` that is not a `u64`, as most systems do not have a standardised [`u128`] type. [`long long`]: c_longlong -[`u64`]: u64 -[`u128`]: u128 diff --git a/library/std/src/os/raw/ushort.md b/library/std/src/os/raw/ushort.md index 6e2506d52cf84..6928e51b352c8 100644 --- a/library/std/src/os/raw/ushort.md +++ b/library/std/src/os/raw/ushort.md @@ -3,4 +3,3 @@ Equivalent to C's `unsigned short` type. This type will almost always be [`u16`], but may differ on some esoteric systems. The C standard technically only requires that this type be an unsigned integer with the same size as a [`short`]. [`short`]: c_short -[`u16`]: u16