Skip to content

Commit 919ca76

Browse files
committed
Temporarily make CStr not a link in the c_char docs
When CStr moves to core with an alias in std, this can link to `crate::ffi::CStr`. However, linking in the reverse direction (from core to std) requires a relative path, and that path can't work from both core::ffi and std::os::raw (different number of `../` traversals required).
1 parent 371079f commit 919ca76

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/src/ffi/c_char.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ Equivalent to C's `char` type.
22

33
[C's `char` type] is completely unlike [Rust's `char` type]; while Rust's type represents a unicode scalar value, C's `char` type is just an ordinary integer. On modern architectures this type will always be either [`i8`] or [`u8`], as they use byte-addresses memory with 8-bit bytes.
44

5-
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.
5+
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.
66

77
[C's `char` type]: https://en.wikipedia.org/wiki/C_data_types#Basic_types
88
[Rust's `char` type]: char
9-
[`CStr`]: crate::ffi::CStr

0 commit comments

Comments
 (0)