Skip to content

Commit 43b6210

Browse files
ojedaintel-lab-lkp
authored andcommitted
rust: pin-init: use Markdown autolinks in Rust comments
"Normal" comments in Rust (`//`) are also formatted in Markdown, like the documentation (`///` and `//!`), see Documentation/rust/coding-guidelines.rst Thus use Markdown autolinks for a couple links that were missing it. It also helps to get proper linking in some software like kitty [1]. Suggested-by: Benno Lossin <[email protected]> Link: Rust-for-Linux/pin-init#32 (comment) [1] Signed-off-by: Miguel Ojeda <[email protected]> Link: Rust-for-Linux/pin-init@dd230d6 Fixes: 84837cf ("rust: pin-init: change examples to the user-space version") Cc: [email protected] [ Change case in title. Reworded commit message. - Benno ] Signed-off-by: Benno Lossin <[email protected]>
1 parent 4045998 commit 43b6210

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: rust/pin-init/examples/pthread_mutex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: Apache-2.0 OR MIT
22

3-
// inspired by https://github.com/nbdd0121/pin-init/blob/trunk/examples/pthread_mutex.rs
3+
// inspired by <https://github.com/nbdd0121/pin-init/blob/trunk/examples/pthread_mutex.rs>
44
#![allow(clippy::undocumented_unsafe_blocks)]
55
#![cfg_attr(feature = "alloc", feature(allocator_api))]
66
#[cfg(not(windows))]

Diff for: rust/pin-init/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,7 @@ impl_zeroable! {
14471447
{<T: ?Sized + Zeroable>} UnsafeCell<T>,
14481448

14491449
// SAFETY: All zeros is equivalent to `None` (option layout optimization guarantee:
1450-
// https://doc.rust-lang.org/stable/std/option/index.html#representation).
1450+
// <https://doc.rust-lang.org/stable/std/option/index.html#representation>).
14511451
Option<NonZeroU8>, Option<NonZeroU16>, Option<NonZeroU32>, Option<NonZeroU64>,
14521452
Option<NonZeroU128>, Option<NonZeroUsize>,
14531453
Option<NonZeroI8>, Option<NonZeroI16>, Option<NonZeroI32>, Option<NonZeroI64>,

0 commit comments

Comments
 (0)