diff options
Diffstat (limited to 'crates/hir_ty')
-rw-r--r-- | crates/hir_ty/src/diagnostics/match_check/usefulness.rs | 2 | ||||
-rw-r--r-- | crates/hir_ty/src/infer.rs | 2 | ||||
-rw-r--r-- | crates/hir_ty/src/infer/coerce.rs | 6 | ||||
-rw-r--r-- | crates/hir_ty/src/lower.rs | 2 |
4 files changed, 6 insertions, 6 deletions
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<()>`. |