Skip to content

Commit a560169

Browse files
xizheyinintel-lab-lkp
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. Link: Rust-for-Linux#1153 Suggested-by: Miguel Ojeda <[email protected]> Signed-off-by: xizheyin <[email protected]>
1 parent a2cc6ff commit a560169

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
@@ -207,7 +207,7 @@ fn main() {
207207
// target feature of the same name plus the other two target features in
208208
// `clang/lib/Driver/ToolChains/Arch/X86.cpp`. These should be eventually enabled via
209209
// `-Ctarget-feature` when `rustc` starts recognizing them (or via a new dedicated
210-
// flag); see https://github.com/rust-lang/rust/issues/116852.
210+
// flag); see <https://github.com/rust-lang/rust/issues/116852>.
211211
features += ",+retpoline-external-thunk";
212212
features += ",+retpoline-indirect-branches";
213213
features += ",+retpoline-indirect-calls";
@@ -216,7 +216,7 @@ fn main() {
216216
// The kernel uses `-mharden-sls=all`, which Clang maps to both these target features in
217217
// `clang/lib/Driver/ToolChains/Arch/X86.cpp`. These should be eventually enabled via
218218
// `-Ctarget-feature` when `rustc` starts recognizing them (or via a new dedicated
219-
// flag); see https://github.com/rust-lang/rust/issues/116851.
219+
// flag); see <https://github.com/rust-lang/rust/issues/116851>.
220220
features += ",+harden-sls-ijmp";
221221
features += ",+harden-sls-ret";
222222
}

0 commit comments

Comments
 (0)