aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty')
-rw-r--r--crates/hir_ty/src/diagnostics/match_check/usefulness.rs2
-rw-r--r--crates/hir_ty/src/infer.rs2
-rw-r--r--crates/hir_ty/src/infer/coerce.rs6
-rw-r--r--crates/hir_ty/src/lower.rs2
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 f5ac71444..8451f9df5 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 9590c2e47..63f37c0ab 100644
--- a/crates/hir_ty/src/infer.rs
+++ b/crates/hir_ty/src/infer.rs
@@ -78,7 +78,7 @@ enum ExprOrPatId {
78impl_from!(ExprId, PatId for ExprOrPatId); 78impl_from!(ExprId, PatId for ExprOrPatId);
79 79
80/// Binding modes inferred for patterns. 80/// 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>
82#[derive(Copy, Clone, Debug, Eq, PartialEq)] 82#[derive(Copy, Clone, Debug, Eq, PartialEq)]
83enum BindingMode { 83enum BindingMode {
84 Move, 84 Move,
diff --git a/crates/hir_ty/src/infer/coerce.rs b/crates/hir_ty/src/infer/coerce.rs
index 8647d7437..4b7f31521 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
8use chalk_ir::{cast::Cast, Mutability, TyVariableKind}; 8use chalk_ir::{cast::Cast, Mutability, TyVariableKind};
9use hir_def::{expr::ExprId, lang_item::LangItemTarget}; 9use 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 a8a9f5ca1..817a65c20 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<()>`.