diff options
Diffstat (limited to 'crates/hir_ty/src')
-rw-r--r-- | crates/hir_ty/src/display.rs | 2 | ||||
-rw-r--r-- | crates/hir_ty/src/infer/pat.rs | 2 | ||||
-rw-r--r-- | crates/hir_ty/src/types.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/display.rs b/crates/hir_ty/src/display.rs index 90801ef2d..e0ca96c6d 100644 --- a/crates/hir_ty/src/display.rs +++ b/crates/hir_ty/src/display.rs | |||
@@ -745,7 +745,7 @@ fn write_bounds_like_dyn_trait( | |||
745 | // existential) here, which is the only thing that's | 745 | // existential) here, which is the only thing that's |
746 | // possible in actual Rust, and hence don't print it | 746 | // possible in actual Rust, and hence don't print it |
747 | write!(f, "{}", f.db.trait_data(trait_).name)?; | 747 | write!(f, "{}", f.db.trait_data(trait_).name)?; |
748 | if let [_, params @ ..] = &*trait_ref.substitution.interned() { | 748 | if let [_, params @ ..] = &*trait_ref.substitution.interned().as_slice() { |
749 | if is_fn_trait { | 749 | if is_fn_trait { |
750 | if let Some(args) = | 750 | if let Some(args) = |
751 | params.first().and_then(|it| it.assert_ty_ref(&Interner).as_tuple()) | 751 | params.first().and_then(|it| it.assert_ty_ref(&Interner).as_tuple()) |
diff --git a/crates/hir_ty/src/infer/pat.rs b/crates/hir_ty/src/infer/pat.rs index f88d5c5d3..a41e8e116 100644 --- a/crates/hir_ty/src/infer/pat.rs +++ b/crates/hir_ty/src/infer/pat.rs | |||
@@ -122,7 +122,7 @@ impl<'a> InferenceContext<'a> { | |||
122 | let ty = match &body[pat] { | 122 | let ty = match &body[pat] { |
123 | &Pat::Tuple { ref args, ellipsis } => { | 123 | &Pat::Tuple { ref args, ellipsis } => { |
124 | let expectations = match expected.as_tuple() { | 124 | let expectations = match expected.as_tuple() { |
125 | Some(parameters) => &*parameters.interned(), | 125 | Some(parameters) => &*parameters.interned().as_slice(), |
126 | _ => &[], | 126 | _ => &[], |
127 | }; | 127 | }; |
128 | 128 | ||
diff --git a/crates/hir_ty/src/types.rs b/crates/hir_ty/src/types.rs index e1a28f5f7..89adad108 100644 --- a/crates/hir_ty/src/types.rs +++ b/crates/hir_ty/src/types.rs | |||
@@ -282,7 +282,7 @@ impl GenericArg { | |||
282 | pub struct Substitution(SmallVec<[GenericArg; 2]>); | 282 | pub struct Substitution(SmallVec<[GenericArg; 2]>); |
283 | 283 | ||
284 | impl Substitution { | 284 | impl Substitution { |
285 | pub fn interned(&self) -> &[GenericArg] { | 285 | pub fn interned(&self) -> &SmallVec<[GenericArg; 2]> { |
286 | &self.0 | 286 | &self.0 |
287 | } | 287 | } |
288 | 288 | ||