diff options
author | Jade <[email protected]> | 2021-06-14 05:57:10 +0100 |
---|---|---|
committer | Jade <[email protected]> | 2021-06-14 05:58:05 +0100 |
commit | 20b325c7d50092cada3408aee958b3d523541f2c (patch) | |
tree | 5f8078106976c0573ef05861241f434fb5271891 /crates | |
parent | 660a89620f65225359559ddcaf158bdb9dfe0d4c (diff) |
tree-wide: make rustdoc links spiky so they are clickable
Diffstat (limited to 'crates')
31 files changed, 36 insertions, 36 deletions
diff --git a/crates/cfg/src/cfg_expr.rs b/crates/cfg/src/cfg_expr.rs index 069fc01d0..8a1a51e6e 100644 --- a/crates/cfg/src/cfg_expr.rs +++ b/crates/cfg/src/cfg_expr.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! The condition expression used in `#[cfg(..)]` attributes. | 1 | //! The condition expression used in `#[cfg(..)]` attributes. |
2 | //! | 2 | //! |
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> |
4 | 4 | ||
5 | use std::{fmt, slice::Iter as SliceIter}; | 5 | use std::{fmt, slice::Iter as SliceIter}; |
6 | 6 | ||
diff --git a/crates/cfg/src/lib.rs b/crates/cfg/src/lib.rs index 59fd38880..03b8dd767 100644 --- a/crates/cfg/src/lib.rs +++ b/crates/cfg/src/lib.rs | |||
@@ -22,7 +22,7 @@ pub use dnf::DnfExpr; | |||
22 | /// `foo` and `bar` are both enabled. And here, we store key-value options as a set of tuple | 22 | /// `foo` and `bar` are both enabled. And here, we store key-value options as a set of tuple |
23 | /// of key and value in `key_values`. | 23 | /// of key and value in `key_values`. |
24 | /// | 24 | /// |
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> |
26 | #[derive(Debug, Clone, PartialEq, Eq, Default)] | 26 | #[derive(Debug, Clone, PartialEq, Eq, Default)] |
27 | pub struct CfgOptions { | 27 | pub struct CfgOptions { |
28 | enabled: FxHashSet<CfgAtom>, | 28 | enabled: FxHashSet<CfgAtom>, |
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index debc3ee62..2ec568b26 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -15,7 +15,7 @@ | |||
15 | //! | 15 | //! |
16 | //! `hir` is what insulates the "we don't know how to actually write an incremental compiler" | 16 | //! `hir` is what insulates the "we don't know how to actually write an incremental compiler" |
17 | //! from the ide with completions, hovers, etc. It is a (soft, internal) boundary: | 17 | //! 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>. |
19 | 19 | ||
20 | #![recursion_limit = "512"] | 20 | #![recursion_limit = "512"] |
21 | 21 | ||
diff --git a/crates/hir_expand/src/eager.rs b/crates/hir_expand/src/eager.rs index 9093255f4..c25ce7634 100644 --- a/crates/hir_expand/src/eager.rs +++ b/crates/hir_expand/src/eager.rs | |||
@@ -17,7 +17,7 @@ | |||
17 | //! > and we need to live with it because it's available on stable and widely relied upon. | 17 | //! > and we need to live with it because it's available on stable and widely relied upon. |
18 | //! | 18 | //! |
19 | //! | 19 | //! |
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> |
21 | 21 | ||
22 | use crate::{ | 22 | use crate::{ |
23 | ast::{self, AstNode}, | 23 | ast::{self, AstNode}, |
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs index 623791b58..33107aa24 100644 --- a/crates/hir_expand/src/lib.rs +++ b/crates/hir_expand/src/lib.rs | |||
@@ -53,7 +53,7 @@ mod test_db; | |||
53 | /// this is a recursive definition! However, the size_of of `HirFileId` is | 53 | /// this is a recursive definition! However, the size_of of `HirFileId` is |
54 | /// finite (because everything bottoms out at the real `FileId`) and small | 54 | /// finite (because everything bottoms out at the real `FileId`) and small |
55 | /// (`MacroCallId` uses the location interning. You can check details here: | 55 | /// (`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>). |
57 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 57 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
58 | pub struct HirFileId(HirFileIdRepr); | 58 | pub struct HirFileId(HirFileIdRepr); |
59 | 59 | ||
diff --git a/crates/hir_ty/src/diagnostics/match_check/usefulness.rs b/crates/hir_ty/src/diagnostics/match_check/usefulness.rs index bd76a606c..64c9d22f3 100644 --- a/crates/hir_ty/src/diagnostics/match_check/usefulness.rs +++ b/crates/hir_ty/src/diagnostics/match_check/usefulness.rs | |||
@@ -1,5 +1,5 @@ | |||
1 | //! Based on rust-lang/rust 1.52.0-nightly (25c15cdbe 2021-04-22) | 1 | //! 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> |
3 | //! | 3 | //! |
4 | //! ----- | 4 | //! ----- |
5 | //! | 5 | //! |
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs index 0e9f777da..78a230598 100644 --- a/crates/hir_ty/src/infer.rs +++ b/crates/hir_ty/src/infer.rs | |||
@@ -80,7 +80,7 @@ enum ExprOrPatId { | |||
80 | impl_from!(ExprId, PatId for ExprOrPatId); | 80 | impl_from!(ExprId, PatId for ExprOrPatId); |
81 | 81 | ||
82 | /// Binding modes inferred for patterns. | 82 | /// Binding modes inferred for patterns. |
83 | /// https://doc.rust-lang.org/reference/patterns.html#binding-modes | 83 | /// <https://doc.rust-lang.org/reference/patterns.html#binding-modes> |
84 | #[derive(Copy, Clone, Debug, Eq, PartialEq)] | 84 | #[derive(Copy, Clone, Debug, Eq, PartialEq)] |
85 | enum BindingMode { | 85 | enum BindingMode { |
86 | Move, | 86 | Move, |
diff --git a/crates/hir_ty/src/infer/coerce.rs b/crates/hir_ty/src/infer/coerce.rs index 03b97e7db..ced2965a1 100644 --- a/crates/hir_ty/src/infer/coerce.rs +++ b/crates/hir_ty/src/infer/coerce.rs | |||
@@ -2,8 +2,8 @@ | |||
2 | //! happen in certain places, e.g. weakening `&mut` to `&` or deref coercions | 2 | //! happen in certain places, e.g. weakening `&mut` to `&` or deref coercions |
3 | //! like going from `&Vec<T>` to `&[T]`. | 3 | //! like going from `&Vec<T>` to `&[T]`. |
4 | //! | 4 | //! |
5 | //! See https://doc.rust-lang.org/nomicon/coercions.html and | 5 | //! See <https://doc.rust-lang.org/nomicon/coercions.html> and |
6 | //! librustc_typeck/check/coercion.rs. | 6 | //! `librustc_typeck/check/coercion.rs`. |
7 | 7 | ||
8 | use chalk_ir::{cast::Cast, Mutability, TyVariableKind}; | 8 | use chalk_ir::{cast::Cast, Mutability, TyVariableKind}; |
9 | use hir_def::{expr::ExprId, lang_item::LangItemTarget}; | 9 | use hir_def::{expr::ExprId, lang_item::LangItemTarget}; |
@@ -331,7 +331,7 @@ impl<'a> InferenceContext<'a> { | |||
331 | 331 | ||
332 | /// Coerce a type using `from_ty: CoerceUnsized<ty_ty>` | 332 | /// Coerce a type using `from_ty: CoerceUnsized<ty_ty>` |
333 | /// | 333 | /// |
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> |
335 | fn try_coerce_unsized(&mut self, from_ty: &Ty, to_ty: &Ty) -> InferResult { | 335 | fn try_coerce_unsized(&mut self, from_ty: &Ty, to_ty: &Ty) -> InferResult { |
336 | // These 'if' statements require some explanation. | 336 | // These 'if' statements require some explanation. |
337 | // The `CoerceUnsized` trait is special - it is only | 337 | // The `CoerceUnsized` trait is special - it is only |
diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index c83933c73..c9a9b71fe 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs | |||
@@ -957,7 +957,7 @@ pub(crate) fn field_types_query( | |||
957 | /// like `T::Item`. | 957 | /// like `T::Item`. |
958 | /// | 958 | /// |
959 | /// See the analogous query in rustc and its comment: | 959 | /// 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> |
961 | /// This is a query mostly to handle cycles somewhat gracefully; e.g. the | 961 | /// This is a query mostly to handle cycles somewhat gracefully; e.g. the |
962 | /// following bounds are disallowed: `T: Foo<U::Item>, U: Foo<T::Item>`, but | 962 | /// following bounds are disallowed: `T: Foo<U::Item>, U: Foo<T::Item>`, but |
963 | /// these are fine: `T: Foo<U::Item>, U: Foo<()>`. | 963 | /// these are fine: `T: Foo<U::Item>, U: Foo<()>`. |
diff --git a/crates/ide_completion/src/completions/attribute.rs b/crates/ide_completion/src/completions/attribute.rs index 7f76e357e..6df569c2a 100644 --- a/crates/ide_completion/src/completions/attribute.rs +++ b/crates/ide_completion/src/completions/attribute.rs | |||
@@ -219,7 +219,7 @@ static KIND_TO_ATTRIBUTES: Lazy<FxHashMap<SyntaxKind, &[&str]>> = Lazy::new(|| { | |||
219 | }); | 219 | }); |
220 | const EXPR_ATTRIBUTES: &[&str] = attrs!(); | 220 | const EXPR_ATTRIBUTES: &[&str] = attrs!(); |
221 | 221 | ||
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> |
223 | // Keep these sorted for the binary search! | 223 | // Keep these sorted for the binary search! |
224 | const ATTRIBUTES: &[AttrCompletion] = &[ | 224 | const ATTRIBUTES: &[AttrCompletion] = &[ |
225 | attr("allow(…)", Some("allow"), Some("allow(${0:lint})")), | 225 | attr("allow(…)", Some("allow"), Some("allow(${0:lint})")), |
diff --git a/crates/mbe/src/expander/matcher.rs b/crates/mbe/src/expander/matcher.rs index c982eb58f..961ba3f7b 100644 --- a/crates/mbe/src/expander/matcher.rs +++ b/crates/mbe/src/expander/matcher.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! An NFA-based parser, which is porting from rustc mbe parsing code | 1 | //! An NFA-based parser, which is porting from rustc mbe parsing code |
2 | //! | 2 | //! |
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> |
4 | //! Here is a quick intro to how the parser works, copied from rustc: | 4 | //! Here is a quick intro to how the parser works, copied from rustc: |
5 | //! | 5 | //! |
6 | //! A 'position' is a dot in the middle of a matcher, usually represented as a | 6 | //! A 'position' is a dot in the middle of a matcher, usually represented as a |
diff --git a/crates/parser/src/grammar/expressions.rs b/crates/parser/src/grammar/expressions.rs index 9d22e1950..686a64345 100644 --- a/crates/parser/src/grammar/expressions.rs +++ b/crates/parser/src/grammar/expressions.rs | |||
@@ -208,7 +208,7 @@ struct Restrictions { | |||
208 | 208 | ||
209 | /// Binding powers of operators for a Pratt parser. | 209 | /// Binding powers of operators for a Pratt parser. |
210 | /// | 210 | /// |
211 | /// See https://www.oilshell.org/blog/2016/11/03.html | 211 | /// See <https://www.oilshell.org/blog/2016/11/03.html> |
212 | #[rustfmt::skip] | 212 | #[rustfmt::skip] |
213 | fn current_op(p: &Parser) -> (u8, SyntaxKind) { | 213 | fn current_op(p: &Parser) -> (u8, SyntaxKind) { |
214 | const NOT_AN_OP: (u8, SyntaxKind) = (0, T![@]); | 214 | const NOT_AN_OP: (u8, SyntaxKind) = (0, T![@]); |
diff --git a/crates/paths/src/lib.rs b/crates/paths/src/lib.rs index f09ad37e3..48dac14c4 100644 --- a/crates/paths/src/lib.rs +++ b/crates/paths/src/lib.rs | |||
@@ -244,7 +244,7 @@ impl RelPath { | |||
244 | } | 244 | } |
245 | } | 245 | } |
246 | 246 | ||
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> |
248 | fn normalize_path(path: &Path) -> PathBuf { | 248 | fn normalize_path(path: &Path) -> PathBuf { |
249 | let mut components = path.components().peekable(); | 249 | let mut components = path.components().peekable(); |
250 | let mut ret = if let Some(c @ Component::Prefix(..)) = components.peek().cloned() { | 250 | let mut ret = if let Some(c @ Component::Prefix(..)) = components.peek().cloned() { |
diff --git a/crates/proc_macro_api/src/version.rs b/crates/proc_macro_api/src/version.rs index 6dbac50b4..28a4ac086 100644 --- a/crates/proc_macro_api/src/version.rs +++ b/crates/proc_macro_api/src/version.rs | |||
@@ -95,7 +95,7 @@ fn read_section<'a>(dylib_binary: &'a [u8], section_name: &str) -> io::Result<&' | |||
95 | /// * [version string bytes encoded in utf8] <- GET THIS BOI | 95 | /// * [version string bytes encoded in utf8] <- GET THIS BOI |
96 | /// * [some more bytes that we don really care but still there] :-) | 96 | /// * [some more bytes that we don really care but still there] :-) |
97 | /// Check this issue for more about the bytes layout: | 97 | /// 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> |
99 | fn read_version(dylib_path: &Path) -> io::Result<String> { | 99 | fn read_version(dylib_path: &Path) -> io::Result<String> { |
100 | let dylib_file = File::open(dylib_path)?; | 100 | let dylib_file = File::open(dylib_path)?; |
101 | let dylib_mmaped = unsafe { Mmap::map(&dylib_file) }?; | 101 | let dylib_mmaped = unsafe { Mmap::map(&dylib_file) }?; |
diff --git a/crates/proc_macro_srv/src/lib.rs b/crates/proc_macro_srv/src/lib.rs index d4f04ee06..f54cbcd61 100644 --- a/crates/proc_macro_srv/src/lib.rs +++ b/crates/proc_macro_srv/src/lib.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | //! RA Proc Macro Server | 1 | //! RA Proc Macro Server |
2 | //! | 2 | //! |
3 | //! This library is able to call compiled Rust custom derive dynamic libraries on arbitrary code. | 3 | //! 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>. |
5 | //! | 5 | //! |
6 | //! But we adapt it to better fit RA needs: | 6 | //! But we adapt it to better fit RA needs: |
7 | //! | 7 | //! |
diff --git a/crates/proc_macro_srv/src/proc_macro/bridge/buffer.rs b/crates/proc_macro_srv/src/proc_macro/bridge/buffer.rs index dae6ff1d1..3b2afe01f 100644 --- a/crates/proc_macro_srv/src/proc_macro/bridge/buffer.rs +++ b/crates/proc_macro_srv/src/proc_macro/bridge/buffer.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! lib-proc-macro Buffer management for same-process client<->server communication. | 1 | //! lib-proc-macro Buffer management for same-process client<->server communication. |
2 | //! | 2 | //! |
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> |
4 | //! augmented with removing unstable features | 4 | //! augmented with removing unstable features |
5 | 5 | ||
6 | use std::io::{self, Write}; | 6 | use std::io::{self, Write}; |
diff --git a/crates/proc_macro_srv/src/proc_macro/bridge/client.rs b/crates/proc_macro_srv/src/proc_macro/bridge/client.rs index b036d4e20..c135cf7a2 100644 --- a/crates/proc_macro_srv/src/proc_macro/bridge/client.rs +++ b/crates/proc_macro_srv/src/proc_macro/bridge/client.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! lib-proc-macro Client-side types. | 1 | //! lib-proc-macro Client-side types. |
2 | //! | 2 | //! |
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> |
4 | //! augmented with removing unstable features | 4 | //! augmented with removing unstable features |
5 | 5 | ||
6 | use super::*; | 6 | use super::*; |
diff --git a/crates/proc_macro_srv/src/proc_macro/bridge/closure.rs b/crates/proc_macro_srv/src/proc_macro/bridge/closure.rs index 273a97715..f5b6d897e 100644 --- a/crates/proc_macro_srv/src/proc_macro/bridge/closure.rs +++ b/crates/proc_macro_srv/src/proc_macro/bridge/closure.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! lib-proc-macro Closure type (equivalent to `&mut dyn FnMut(A) -> R`) that's `repr(C)`. | 1 | //! lib-proc-macro Closure type (equivalent to `&mut dyn FnMut(A) -> R`) that's `repr(C)`. |
2 | //! | 2 | //! |
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> |
4 | //! augmented with removing unstable features | 4 | //! augmented with removing unstable features |
5 | 5 | ||
6 | #[repr(C)] | 6 | #[repr(C)] |
diff --git a/crates/proc_macro_srv/src/proc_macro/bridge/handle.rs b/crates/proc_macro_srv/src/proc_macro/bridge/handle.rs index a2f77b5ac..d2a65d249 100644 --- a/crates/proc_macro_srv/src/proc_macro/bridge/handle.rs +++ b/crates/proc_macro_srv/src/proc_macro/bridge/handle.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! lib-proc-macro Server-side handles and storage for per-handle data. | 1 | //! lib-proc-macro Server-side handles and storage for per-handle data. |
2 | //! | 2 | //! |
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> |
4 | //! augmented with removing unstable features | 4 | //! augmented with removing unstable features |
5 | 5 | ||
6 | use std::collections::{BTreeMap, HashMap}; | 6 | use std::collections::{BTreeMap, HashMap}; |
diff --git a/crates/proc_macro_srv/src/proc_macro/bridge/mod.rs b/crates/proc_macro_srv/src/proc_macro/bridge/mod.rs index e67902682..375396d1b 100644 --- a/crates/proc_macro_srv/src/proc_macro/bridge/mod.rs +++ b/crates/proc_macro_srv/src/proc_macro/bridge/mod.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! lib-proc-macro Internal interface for communicating between a `proc_macro` client | 1 | //! lib-proc-macro Internal interface for communicating between a `proc_macro` client |
2 | //! | 2 | //! |
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> |
4 | //! augmented with removing unstable features | 4 | //! augmented with removing unstable features |
5 | //! | 5 | //! |
6 | //! Internal interface for communicating between a `proc_macro` client | 6 | //! Internal interface for communicating between a `proc_macro` client |
diff --git a/crates/proc_macro_srv/src/proc_macro/bridge/rpc.rs b/crates/proc_macro_srv/src/proc_macro/bridge/rpc.rs index bd1e7c2fc..69928ec84 100644 --- a/crates/proc_macro_srv/src/proc_macro/bridge/rpc.rs +++ b/crates/proc_macro_srv/src/proc_macro/bridge/rpc.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! lib-proc-macro Serialization for client-server communication. | 1 | //! lib-proc-macro Serialization for client-server communication. |
2 | //! | 2 | //! |
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> |
4 | //! augmented with removing unstable features | 4 | //! augmented with removing unstable features |
5 | //! | 5 | //! |
6 | //! Serialization for client-server communication. | 6 | //! Serialization for client-server communication. |
diff --git a/crates/proc_macro_srv/src/proc_macro/bridge/scoped_cell.rs b/crates/proc_macro_srv/src/proc_macro/bridge/scoped_cell.rs index 6ef7ea43c..0436bc418 100644 --- a/crates/proc_macro_srv/src/proc_macro/bridge/scoped_cell.rs +++ b/crates/proc_macro_srv/src/proc_macro/bridge/scoped_cell.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! lib-proc-macro `Cell` variant for (scoped) existential lifetimes. | 1 | //! lib-proc-macro `Cell` variant for (scoped) existential lifetimes. |
2 | //! | 2 | //! |
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> |
4 | //! augmented with removing unstable features | 4 | //! augmented with removing unstable features |
5 | 5 | ||
6 | use std::cell::Cell; | 6 | use std::cell::Cell; |
diff --git a/crates/proc_macro_srv/src/proc_macro/bridge/server.rs b/crates/proc_macro_srv/src/proc_macro/bridge/server.rs index 88fbdc078..cc9afd84b 100644 --- a/crates/proc_macro_srv/src/proc_macro/bridge/server.rs +++ b/crates/proc_macro_srv/src/proc_macro/bridge/server.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! lib-proc-macro server-side traits | 1 | //! lib-proc-macro server-side traits |
2 | //! | 2 | //! |
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> |
4 | //! augmented with removing unstable features | 4 | //! augmented with removing unstable features |
5 | 5 | ||
6 | use super::*; | 6 | use super::*; |
diff --git a/crates/proc_macro_srv/src/proc_macro/diagnostic.rs b/crates/proc_macro_srv/src/proc_macro/diagnostic.rs index 55d93917c..331e23829 100644 --- a/crates/proc_macro_srv/src/proc_macro/diagnostic.rs +++ b/crates/proc_macro_srv/src/proc_macro/diagnostic.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! lib-proc-macro diagnostic | 1 | //! lib-proc-macro diagnostic |
2 | //! | 2 | //! |
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> |
4 | //! augmented with removing unstable features | 4 | //! augmented with removing unstable features |
5 | 5 | ||
6 | use crate::proc_macro::Span; | 6 | use crate::proc_macro::Span; |
diff --git a/crates/proc_macro_srv/src/proc_macro/mod.rs b/crates/proc_macro_srv/src/proc_macro/mod.rs index fc6e7344f..b7c1d04b5 100644 --- a/crates/proc_macro_srv/src/proc_macro/mod.rs +++ b/crates/proc_macro_srv/src/proc_macro/mod.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! lib-proc-macro main module | 1 | //! lib-proc-macro main module |
2 | //! | 2 | //! |
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> |
4 | //! augmented with removing unstable features | 4 | //! augmented with removing unstable features |
5 | 5 | ||
6 | // NOTE(@edwin0cheng): | 6 | // NOTE(@edwin0cheng): |
diff --git a/crates/proc_macro_srv/src/rustc_server.rs b/crates/proc_macro_srv/src/rustc_server.rs index 5d765f6e2..fa28bc460 100644 --- a/crates/proc_macro_srv/src/rustc_server.rs +++ b/crates/proc_macro_srv/src/rustc_server.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! Rustc proc-macro server implementation with tt | 1 | //! Rustc proc-macro server implementation with tt |
2 | //! | 2 | //! |
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> |
4 | //! The lib-proc-macro server backend is `TokenStream`-agnostic, such that | 4 | //! The lib-proc-macro server backend is `TokenStream`-agnostic, such that |
5 | //! we could provide any TokenStream implementation. | 5 | //! we could provide any TokenStream implementation. |
6 | //! The original idea from fedochet is using proc-macro2 as backend, | 6 | //! The original idea from fedochet is using proc-macro2 as backend, |
diff --git a/crates/profile/src/lib.rs b/crates/profile/src/lib.rs index 7cd01a7df..5ea5039db 100644 --- a/crates/profile/src/lib.rs +++ b/crates/profile/src/lib.rs | |||
@@ -50,10 +50,10 @@ impl Drop for Scope { | |||
50 | /// A wrapper around google_cpu_profiler. | 50 | /// A wrapper around google_cpu_profiler. |
51 | /// | 51 | /// |
52 | /// Usage: | 52 | /// 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. |
54 | /// 2. Build with `cpu_profiler` feature. | 54 | /// 2. Build with `cpu_profiler` feature. |
55 | /// 3. Run the code, the *raw* output would be in the `./out.profile` file. | 55 | /// 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>). |
57 | /// 5. Bump sampling frequency to once per ms: `export CPUPROFILE_FREQUENCY=1000` | 57 | /// 5. Bump sampling frequency to once per ms: `export CPUPROFILE_FREQUENCY=1000` |
58 | /// 6. Use something like `pprof -svg target/release/rust-analyzer ./out.profile` to see the results. | 58 | /// 6. Use something like `pprof -svg target/release/rust-analyzer ./out.profile` to see the results. |
59 | /// | 59 | /// |
@@ -75,7 +75,7 @@ impl Drop for Scope { | |||
75 | /// | 75 | /// |
76 | /// See this diff for how to profile completions: | 76 | /// See this diff for how to profile completions: |
77 | /// | 77 | /// |
78 | /// https://github.com/rust-analyzer/rust-analyzer/pull/5306 | 78 | /// <https://github.com/rust-analyzer/rust-analyzer/pull/5306> |
79 | #[derive(Debug)] | 79 | #[derive(Debug)] |
80 | pub struct CpuSpan { | 80 | pub struct CpuSpan { |
81 | _private: (), | 81 | _private: (), |
diff --git a/crates/rust-analyzer/src/semantic_tokens.rs b/crates/rust-analyzer/src/semantic_tokens.rs index db216d951..c20642231 100644 --- a/crates/rust-analyzer/src/semantic_tokens.rs +++ b/crates/rust-analyzer/src/semantic_tokens.rs | |||
@@ -112,7 +112,7 @@ impl ops::BitOrAssign<SemanticTokenModifier> for ModifierSet { | |||
112 | 112 | ||
113 | /// Tokens are encoded relative to each other. | 113 | /// Tokens are encoded relative to each other. |
114 | /// | 114 | /// |
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> |
116 | pub(crate) struct SemanticTokensBuilder { | 116 | pub(crate) struct SemanticTokensBuilder { |
117 | id: String, | 117 | id: String, |
118 | prev_line: u32, | 118 | prev_line: u32, |
diff --git a/crates/stdx/src/panic_context.rs b/crates/stdx/src/panic_context.rs index 8d51e20d3..26debf3c4 100644 --- a/crates/stdx/src/panic_context.rs +++ b/crates/stdx/src/panic_context.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! A micro-crate to enhance panic messages with context info. | 1 | //! A micro-crate to enhance panic messages with context info. |
2 | //! | 2 | //! |
3 | //! FIXME: upstream to https://github.com/kriomant/panic-context ? | 3 | //! FIXME: upstream to <https://github.com/kriomant/panic-context> ? |
4 | 4 | ||
5 | use std::{cell::RefCell, panic, sync::Once}; | 5 | use std::{cell::RefCell, panic, sync::Once}; |
6 | 6 | ||
diff --git a/crates/stdx/src/process.rs b/crates/stdx/src/process.rs index b0fa12f76..692a2ab3d 100644 --- a/crates/stdx/src/process.rs +++ b/crates/stdx/src/process.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | //! Read both stdout and stderr of child without deadlocks. | 1 | //! Read both stdout and stderr of child without deadlocks. |
2 | //! | 2 | //! |
3 | //! https://github.com/rust-lang/cargo/blob/905af549966f23a9288e9993a85d1249a5436556/crates/cargo-util/src/read2.rs | 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 | 4 | //! <https://github.com/rust-lang/cargo/blob/58a961314437258065e23cb6316dfc121d96fb71/crates/cargo-util/src/process_builder.rs#L231> |
5 | 5 | ||
6 | use std::{ | 6 | use std::{ |
7 | io, | 7 | io, |
diff --git a/crates/tt/src/buffer.rs b/crates/tt/src/buffer.rs index e0021039a..dc577700f 100644 --- a/crates/tt/src/buffer.rs +++ b/crates/tt/src/buffer.rs | |||
@@ -133,7 +133,7 @@ impl<'a> TokenTreeRef<'a> { | |||
133 | } | 133 | } |
134 | } | 134 | } |
135 | 135 | ||
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> |
137 | #[derive(Copy, Clone, Debug)] | 137 | #[derive(Copy, Clone, Debug)] |
138 | pub struct Cursor<'a> { | 138 | pub struct Cursor<'a> { |
139 | buffer: &'a TokenBuffer<'a>, | 139 | buffer: &'a TokenBuffer<'a>, |