From 20b325c7d50092cada3408aee958b3d523541f2c Mon Sep 17 00:00:00 2001 From: Jade Date: Sun, 13 Jun 2021 21:57:10 -0700 Subject: tree-wide: make rustdoc links spiky so they are clickable --- crates/hir_ty/src/diagnostics/match_check/usefulness.rs | 2 +- crates/hir_ty/src/infer.rs | 2 +- crates/hir_ty/src/infer/coerce.rs | 6 +++--- crates/hir_ty/src/lower.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/hir_ty/src') 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 @@ //! Based on rust-lang/rust 1.52.0-nightly (25c15cdbe 2021-04-22) -//! https://github.com/rust-lang/rust/blob/25c15cdbe/compiler/rustc_mir_build/src/thir/pattern/usefulness.rs +//! //! //! ----- //! 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 { impl_from!(ExprId, PatId for ExprOrPatId); /// Binding modes inferred for patterns. -/// https://doc.rust-lang.org/reference/patterns.html#binding-modes +/// #[derive(Copy, Clone, Debug, Eq, PartialEq)] enum BindingMode { 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 @@ //! happen in certain places, e.g. weakening `&mut` to `&` or deref coercions //! like going from `&Vec` to `&[T]`. //! -//! See https://doc.rust-lang.org/nomicon/coercions.html and -//! librustc_typeck/check/coercion.rs. +//! See and +//! `librustc_typeck/check/coercion.rs`. use chalk_ir::{cast::Cast, Mutability, TyVariableKind}; use hir_def::{expr::ExprId, lang_item::LangItemTarget}; @@ -331,7 +331,7 @@ impl<'a> InferenceContext<'a> { /// Coerce a type using `from_ty: CoerceUnsized` /// - /// See: https://doc.rust-lang.org/nightly/std/marker/trait.CoerceUnsized.html + /// See: fn try_coerce_unsized(&mut self, from_ty: &Ty, to_ty: &Ty) -> InferResult { // These 'if' statements require some explanation. // 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( /// like `T::Item`. /// /// See the analogous query in rustc and its comment: -/// https://github.com/rust-lang/rust/blob/9150f844e2624eb013ec78ca08c1d416e6644026/src/librustc_typeck/astconv.rs#L46 +/// /// This is a query mostly to handle cycles somewhat gracefully; e.g. the /// following bounds are disallowed: `T: Foo, U: Foo`, but /// these are fine: `T: Foo, U: Foo<()>`. -- cgit v1.2.3