Skip to content

Commit 86d990c

Browse files
xizheyinojeda
authored andcommitted
rust: convert raw URLs to Markdown autolinks in comments
Some comments in Rust files use raw URLs (http://example.com) rather than Markdown autolinks <URL>. This inconsistency makes the documentation less uniform and harder to maintain. This patch converts all remaining raw URLs in Rust code comments to use the Markdown autolink format, maintaining consistency with the rest of the codebase which already uses this style. Suggested-by: Miguel Ojeda <[email protected]> Link: #1153 Signed-off-by: Xizhe Yin <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ Used From form for Signed-off-by. Sorted tags. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent b9b701f commit 86d990c

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

rust/kernel/alloc/kbox.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub type VBox<T> = Box<T, super::allocator::Vmalloc>;
101101
pub type KVBox<T> = Box<T, super::allocator::KVmalloc>;
102102

103103
// SAFETY: All zeros is equivalent to `None` (option layout optimization guarantee:
104-
// https://doc.rust-lang.org/stable/std/option/index.html#representation).
104+
// <https://doc.rust-lang.org/stable/std/option/index.html#representation>).
105105
unsafe impl<T, A: Allocator> ZeroableOption for Box<T, A> {}
106106

107107
// SAFETY: `Box` is `Send` if `T` is `Send` because the `Box` owns a `T`.

rust/kernel/block/mq/gen_disk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl GenDiskBuilder {
129129
get_unique_id: None,
130130
// TODO: Set to THIS_MODULE. Waiting for const_refs_to_static feature to
131131
// be merged (unstable in rustc 1.78 which is staged for linux 6.10)
132-
// https://github.com/rust-lang/rust/issues/119618
132+
// <https://github.com/rust-lang/rust/issues/119618>
133133
owner: core::ptr::null_mut(),
134134
pr_ops: core::ptr::null_mut(),
135135
free_disk: None,

rust/kernel/std_vendor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ macro_rules! dbg {
148148
};
149149
($val:expr $(,)?) => {
150150
// Use of `match` here is intentional because it affects the lifetimes
151-
// of temporaries - https://stackoverflow.com/a/48732525/1063961
151+
// of temporaries - <https://stackoverflow.com/a/48732525/1063961>
152152
match $val {
153153
tmp => {
154154
$crate::pr_info!("[{}:{}:{}] {} = {:#?}\n",

rust/kernel/sync/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pub struct Arc<T: ?Sized> {
135135
// meaningful with respect to dropck - but this may change in the future so this is left here
136136
// out of an abundance of caution.
137137
//
138-
// See https://doc.rust-lang.org/nomicon/phantom-data.html#generic-parameters-and-drop-checking
138+
// See <https://doc.rust-lang.org/nomicon/phantom-data.html#generic-parameters-and-drop-checking>
139139
// for more detail on the semantics of dropck in the presence of `PhantomData`.
140140
_p: PhantomData<ArcInner<T>>,
141141
}

scripts/generate_rust_target.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ fn main() {
209209
// target feature of the same name plus the other two target features in
210210
// `clang/lib/Driver/ToolChains/Arch/X86.cpp`. These should be eventually enabled via
211211
// `-Ctarget-feature` when `rustc` starts recognizing them (or via a new dedicated
212-
// flag); see https://github.com/rust-lang/rust/issues/116852.
212+
// flag); see <https://github.com/rust-lang/rust/issues/116852>.
213213
features += ",+retpoline-external-thunk";
214214
features += ",+retpoline-indirect-branches";
215215
features += ",+retpoline-indirect-calls";
@@ -218,7 +218,7 @@ fn main() {
218218
// The kernel uses `-mharden-sls=all`, which Clang maps to both these target features in
219219
// `clang/lib/Driver/ToolChains/Arch/X86.cpp`. These should be eventually enabled via
220220
// `-Ctarget-feature` when `rustc` starts recognizing them (or via a new dedicated
221-
// flag); see https://github.com/rust-lang/rust/issues/116851.
221+
// flag); see <https://github.com/rust-lang/rust/issues/116851>.
222222
features += ",+harden-sls-ijmp";
223223
features += ",+harden-sls-ret";
224224
}

0 commit comments

Comments
 (0)