Skip to content

Commit 5a8ddb4

Browse files
bors[bot]lf-
andauthored
Merge #9260
9260: tree-wide: make rustdoc links spiky so they are clickable r=matklad a=lf- Rustdoc was complaining about these while I was running with --document-private-items and I figure they should be fixed. Co-authored-by: Jade <[email protected]>
2 parents f0618a8 + 20b325c commit 5a8ddb4

File tree

32 files changed

+37
-37
lines changed

32 files changed

+37
-37
lines changed

crates/cfg/src/cfg_expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! The condition expression used in `#[cfg(..)]` attributes.
22
//!
3-
//! See: https://doc.rust-lang.org/reference/conditional-compilation.html#conditional-compilation
3+
//! See: <https://doc.rust-lang.org/reference/conditional-compilation.html#conditional-compilation>
44
55
use std::{fmt, slice::Iter as SliceIter};
66

crates/cfg/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub use dnf::DnfExpr;
2222
/// `foo` and `bar` are both enabled. And here, we store key-value options as a set of tuple
2323
/// of key and value in `key_values`.
2424
///
25-
/// See: https://doc.rust-lang.org/reference/conditional-compilation.html#set-configuration-options
25+
/// See: <https://doc.rust-lang.org/reference/conditional-compilation.html#set-configuration-options>
2626
#[derive(Debug, Clone, PartialEq, Eq, Default)]
2727
pub struct CfgOptions {
2828
enabled: FxHashSet<CfgAtom>,

crates/hir/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//!
1616
//! `hir` is what insulates the "we don't know how to actually write an incremental compiler"
1717
//! from the ide with completions, hovers, etc. It is a (soft, internal) boundary:
18-
//! https://www.tedinski.com/2018/02/06/system-boundaries.html.
18+
//! <https://www.tedinski.com/2018/02/06/system-boundaries.html>.
1919
2020
#![recursion_limit = "512"]
2121

crates/hir_expand/src/eager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
//! > and we need to live with it because it's available on stable and widely relied upon.
1818
//!
1919
//!
20-
//! See the full discussion : https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Eager.20expansion.20of.20built-in.20macros
20+
//! See the full discussion : <https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Eager.20expansion.20of.20built-in.20macros>
2121
2222
use crate::{
2323
ast::{self, AstNode},

crates/hir_expand/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ mod test_db;
5353
/// this is a recursive definition! However, the size_of of `HirFileId` is
5454
/// finite (because everything bottoms out at the real `FileId`) and small
5555
/// (`MacroCallId` uses the location interning. You can check details here:
56-
/// https://en.wikipedia.org/wiki/String_interning).
56+
/// <https://en.wikipedia.org/wiki/String_interning>).
5757
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
5858
pub struct HirFileId(HirFileIdRepr);
5959

crates/hir_ty/src/diagnostics/match_check/usefulness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Based on rust-lang/rust 1.52.0-nightly (25c15cdbe 2021-04-22)
2-
//! https://github.com/rust-lang/rust/blob/25c15cdbe/compiler/rustc_mir_build/src/thir/pattern/usefulness.rs
2+
//! <https://github.com/rust-lang/rust/blob/25c15cdbe/compiler/rustc_mir_build/src/thir/pattern/usefulness.rs>
33
//!
44
//! -----
55
//!

crates/hir_ty/src/infer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ enum ExprOrPatId {
7878
impl_from!(ExprId, PatId for ExprOrPatId);
7979

8080
/// Binding modes inferred for patterns.
81-
/// https://doc.rust-lang.org/reference/patterns.html#binding-modes
81+
/// <https://doc.rust-lang.org/reference/patterns.html#binding-modes>
8282
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
8383
enum BindingMode {
8484
Move,

crates/hir_ty/src/infer/coerce.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//! happen in certain places, e.g. weakening `&mut` to `&` or deref coercions
33
//! like going from `&Vec<T>` to `&[T]`.
44
//!
5-
//! See https://doc.rust-lang.org/nomicon/coercions.html and
6-
//! librustc_typeck/check/coercion.rs.
5+
//! See <https://doc.rust-lang.org/nomicon/coercions.html> and
6+
//! `librustc_typeck/check/coercion.rs`.
77
88
use chalk_ir::{cast::Cast, Mutability, TyVariableKind};
99
use hir_def::{expr::ExprId, lang_item::LangItemTarget};
@@ -331,7 +331,7 @@ impl<'a> InferenceContext<'a> {
331331

332332
/// Coerce a type using `from_ty: CoerceUnsized<ty_ty>`
333333
///
334-
/// See: https://doc.rust-lang.org/nightly/std/marker/trait.CoerceUnsized.html
334+
/// See: <https://doc.rust-lang.org/nightly/std/marker/trait.CoerceUnsized.html>
335335
fn try_coerce_unsized(&mut self, from_ty: &Ty, to_ty: &Ty) -> InferResult {
336336
// These 'if' statements require some explanation.
337337
// The `CoerceUnsized` trait is special - it is only

crates/hir_ty/src/lower.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ pub(crate) fn field_types_query(
957957
/// like `T::Item`.
958958
///
959959
/// See the analogous query in rustc and its comment:
960-
/// https://github.com/rust-lang/rust/blob/9150f844e2624eb013ec78ca08c1d416e6644026/src/librustc_typeck/astconv.rs#L46
960+
/// <https://github.com/rust-lang/rust/blob/9150f844e2624eb013ec78ca08c1d416e6644026/src/librustc_typeck/astconv.rs#L46>
961961
/// This is a query mostly to handle cycles somewhat gracefully; e.g. the
962962
/// following bounds are disallowed: `T: Foo<U::Item>, U: Foo<T::Item>`, but
963963
/// these are fine: `T: Foo<U::Item>, U: Foo<()>`.

crates/ide_completion/src/completions/attribute.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ static KIND_TO_ATTRIBUTES: Lazy<FxHashMap<SyntaxKind, &[&str]>> = Lazy::new(|| {
219219
});
220220
const EXPR_ATTRIBUTES: &[&str] = attrs!();
221221

222-
/// https://doc.rust-lang.org/reference/attributes.html#built-in-attributes-index
222+
/// <https://doc.rust-lang.org/reference/attributes.html#built-in-attributes-index>
223223
// Keep these sorted for the binary search!
224224
const ATTRIBUTES: &[AttrCompletion] = &[
225225
attr("allow(…)", Some("allow"), Some("allow(${0:lint})")),

crates/mbe/src/expander/matcher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! An NFA-based parser, which is porting from rustc mbe parsing code
22
//!
3-
//! See https://github.com/rust-lang/rust/blob/70b18bc2cbac4712020019f5bf57c00905373205/compiler/rustc_expand/src/mbe/macro_parser.rs
3+
//! See <https://github.com/rust-lang/rust/blob/70b18bc2cbac4712020019f5bf57c00905373205/compiler/rustc_expand/src/mbe/macro_parser.rs>
44
//! Here is a quick intro to how the parser works, copied from rustc:
55
//!
66
//! A 'position' is a dot in the middle of a matcher, usually represented as a

crates/parser/src/grammar/expressions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ struct Restrictions {
208208

209209
/// Binding powers of operators for a Pratt parser.
210210
///
211-
/// See https://www.oilshell.org/blog/2016/11/03.html
211+
/// See <https://www.oilshell.org/blog/2016/11/03.html>
212212
#[rustfmt::skip]
213213
fn current_op(p: &Parser) -> (u8, SyntaxKind) {
214214
const NOT_AN_OP: (u8, SyntaxKind) = (0, T![@]);

crates/paths/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ impl RelPath {
244244
}
245245
}
246246

247-
/// Taken from https://github.com/rust-lang/cargo/blob/79c769c3d7b4c2cf6a93781575b7f592ef974255/src/cargo/util/paths.rs#L60-L85
247+
/// Taken from <https://github.com/rust-lang/cargo/blob/79c769c3d7b4c2cf6a93781575b7f592ef974255/src/cargo/util/paths.rs#L60-L85>
248248
fn normalize_path(path: &Path) -> PathBuf {
249249
let mut components = path.components().peekable();
250250
let mut ret = if let Some(c @ Component::Prefix(..)) = components.peek().cloned() {

crates/proc_macro_api/src/version.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ fn read_section<'a>(dylib_binary: &'a [u8], section_name: &str) -> io::Result<&'
9595
/// * [version string bytes encoded in utf8] <- GET THIS BOI
9696
/// * [some more bytes that we don really care but still there] :-)
9797
/// Check this issue for more about the bytes layout:
98-
/// https://github.com/rust-analyzer/rust-analyzer/issues/6174
98+
/// <https://github.com/rust-analyzer/rust-analyzer/issues/6174>
9999
fn read_version(dylib_path: &Path) -> io::Result<String> {
100100
let dylib_file = File::open(dylib_path)?;
101101
let dylib_mmaped = unsafe { Mmap::map(&dylib_file) }?;

crates/proc_macro_srv/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! RA Proc Macro Server
22
//!
33
//! This library is able to call compiled Rust custom derive dynamic libraries on arbitrary code.
4-
//! The general idea here is based on https://github.com/fedochet/rust-proc-macro-expander.
4+
//! The general idea here is based on <https://github.com/fedochet/rust-proc-macro-expander>.
55
//!
66
//! But we adapt it to better fit RA needs:
77
//!

crates/proc_macro_srv/src/proc_macro/bridge/buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! lib-proc-macro Buffer management for same-process client<->server communication.
22
//!
3-
//! Copy from https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/buffer.rs
3+
//! Copy from <https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/buffer.rs>
44
//! augmented with removing unstable features
55
66
use std::io::{self, Write};

crates/proc_macro_srv/src/proc_macro/bridge/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! lib-proc-macro Client-side types.
22
//!
3-
//! Copy from https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/client.rs
3+
//! Copy from <https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/client.rs>
44
//! augmented with removing unstable features
55
66
use super::*;

crates/proc_macro_srv/src/proc_macro/bridge/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! lib-proc-macro Closure type (equivalent to `&mut dyn FnMut(A) -> R`) that's `repr(C)`.
22
//!
3-
//! Copy from https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/closure.rs#
3+
//! Copy from <https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/closure.rs>
44
//! augmented with removing unstable features
55
66
#[repr(C)]

crates/proc_macro_srv/src/proc_macro/bridge/handle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! lib-proc-macro Server-side handles and storage for per-handle data.
22
//!
3-
//! Copy from https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/handle.rs
3+
//! Copy from <https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/handle.rs>
44
//! augmented with removing unstable features
55
66
use std::collections::{BTreeMap, HashMap};

crates/proc_macro_srv/src/proc_macro/bridge/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! lib-proc-macro Internal interface for communicating between a `proc_macro` client
22
//!
3-
//! Copy from https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/mod.rs
3+
//! Copy from <https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/mod.rs>
44
//! augmented with removing unstable features
55
//!
66
//! Internal interface for communicating between a `proc_macro` client

crates/proc_macro_srv/src/proc_macro/bridge/rpc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! lib-proc-macro Serialization for client-server communication.
22
//!
3-
//! Copy from https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/rpc.rs
3+
//! Copy from <https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/rpc.rs>
44
//! augmented with removing unstable features
55
//!
66
//! Serialization for client-server communication.

crates/proc_macro_srv/src/proc_macro/bridge/scoped_cell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! lib-proc-macro `Cell` variant for (scoped) existential lifetimes.
22
//!
3-
//! Copy from https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/scoped_cell.rs#L1
3+
//! Copy from <https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/scoped_cell.rs#L1>
44
//! augmented with removing unstable features
55
66
use std::cell::Cell;

crates/proc_macro_srv/src/proc_macro/bridge/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! lib-proc-macro server-side traits
22
//!
3-
//! Copy from https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/server.rs
3+
//! Copy from <https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/bridge/server.rs>
44
//! augmented with removing unstable features
55
66
use super::*;

crates/proc_macro_srv/src/proc_macro/diagnostic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! lib-proc-macro diagnostic
22
//!
3-
//! Copy from https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/diagnostic.rs
3+
//! Copy from <https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/diagnostic.rs>
44
//! augmented with removing unstable features
55
66
use crate::proc_macro::Span;

crates/proc_macro_srv/src/proc_macro/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! lib-proc-macro main module
22
//!
3-
//! Copy from https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/lib.rs
3+
//! Copy from <https://github.com/rust-lang/rust/blob/6050e523bae6de61de4e060facc43dc512adaccd/src/libproc_macro/lib.rs>
44
//! augmented with removing unstable features
55
66
// NOTE(@edwin0cheng):

crates/proc_macro_srv/src/rustc_server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Rustc proc-macro server implementation with tt
22
//!
3-
//! Based on idea from https://github.com/fedochet/rust-proc-macro-expander
3+
//! Based on idea from <https://github.com/fedochet/rust-proc-macro-expander>
44
//! The lib-proc-macro server backend is `TokenStream`-agnostic, such that
55
//! we could provide any TokenStream implementation.
66
//! The original idea from fedochet is using proc-macro2 as backend,

crates/profile/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ impl Drop for Scope {
5050
/// A wrapper around google_cpu_profiler.
5151
///
5252
/// Usage:
53-
/// 1. Install gpref_tools (https://github.com/gperftools/gperftools), probably packaged with your Linux distro.
53+
/// 1. Install gpref_tools (<https://github.com/gperftools/gperftools>), probably packaged with your Linux distro.
5454
/// 2. Build with `cpu_profiler` feature.
5555
/// 3. Run the code, the *raw* output would be in the `./out.profile` file.
56-
/// 4. Install pprof for visualization (https://github.com/google/pprof).
56+
/// 4. Install pprof for visualization (<https://github.com/google/pprof>).
5757
/// 5. Bump sampling frequency to once per ms: `export CPUPROFILE_FREQUENCY=1000`
5858
/// 6. Use something like `pprof -svg target/release/rust-analyzer ./out.profile` to see the results.
5959
///
@@ -75,7 +75,7 @@ impl Drop for Scope {
7575
///
7676
/// See this diff for how to profile completions:
7777
///
78-
/// https://github.com/rust-analyzer/rust-analyzer/pull/5306
78+
/// <https://github.com/rust-analyzer/rust-analyzer/pull/5306>
7979
#[derive(Debug)]
8080
pub struct CpuSpan {
8181
_private: (),

crates/rust-analyzer/src/semantic_tokens.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl ops::BitOrAssign<SemanticTokenModifier> for ModifierSet {
112112

113113
/// Tokens are encoded relative to each other.
114114
///
115-
/// This is a direct port of https://github.com/microsoft/vscode-languageserver-node/blob/f425af9de46a0187adb78ec8a46b9b2ce80c5412/server/src/sematicTokens.proposed.ts#L45
115+
/// This is a direct port of <https://github.com/microsoft/vscode-languageserver-node/blob/f425af9de46a0187adb78ec8a46b9b2ce80c5412/server/src/sematicTokens.proposed.ts#L45>
116116
pub(crate) struct SemanticTokensBuilder {
117117
id: String,
118118
prev_line: u32,

crates/stdx/src/panic_context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! A micro-crate to enhance panic messages with context info.
22
//!
3-
//! FIXME: upstream to https://github.com/kriomant/panic-context ?
3+
//! FIXME: upstream to <https://github.com/kriomant/panic-context> ?
44
55
use std::{cell::RefCell, panic, sync::Once};
66

crates/stdx/src/process.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Read both stdout and stderr of child without deadlocks.
22
//!
3-
//! https://github.com/rust-lang/cargo/blob/905af549966f23a9288e9993a85d1249a5436556/crates/cargo-util/src/read2.rs
4-
//! https://github.com/rust-lang/cargo/blob/58a961314437258065e23cb6316dfc121d96fb71/crates/cargo-util/src/process_builder.rs#L231
3+
//! <https://github.com/rust-lang/cargo/blob/905af549966f23a9288e9993a85d1249a5436556/crates/cargo-util/src/read2.rs>
4+
//! <https://github.com/rust-lang/cargo/blob/58a961314437258065e23cb6316dfc121d96fb71/crates/cargo-util/src/process_builder.rs#L231>
55
66
use std::{
77
io,

crates/tt/src/buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl<'a> TokenTreeRef<'a> {
133133
}
134134
}
135135

136-
/// A safe version of `Cursor` from `syn` crate https://github.com/dtolnay/syn/blob/6533607f91686545cb034d2838beea338d9d0742/src/buffer.rs#L125
136+
/// A safe version of `Cursor` from `syn` crate <https://github.com/dtolnay/syn/blob/6533607f91686545cb034d2838beea338d9d0742/src/buffer.rs#L125>
137137
#[derive(Copy, Clone, Debug)]
138138
pub struct Cursor<'a> {
139139
buffer: &'a TokenBuffer<'a>,

xtask/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! See https://github.com/matklad/cargo-xtask/.
1+
//! See <https://github.com/matklad/cargo-xtask/>.
22
//!
33
//! This binary defines various auxiliary build commands, which are not
44
//! expressible with just `cargo`. Notably, it provides tests via `cargo test -p xtask`

0 commit comments

Comments
 (0)