Skip to content

Commit dc116f7

Browse files
committed
Fix return type of Substitution::interned
1 parent be0084a commit dc116f7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

crates/hir_ty/src/display.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ fn write_bounds_like_dyn_trait(
745745
// existential) here, which is the only thing that's
746746
// possible in actual Rust, and hence don't print it
747747
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() {
749749
if is_fn_trait {
750750
if let Some(args) =
751751
params.first().and_then(|it| it.assert_ty_ref(&Interner).as_tuple())

crates/hir_ty/src/infer/pat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl<'a> InferenceContext<'a> {
122122
let ty = match &body[pat] {
123123
&Pat::Tuple { ref args, ellipsis } => {
124124
let expectations = match expected.as_tuple() {
125-
Some(parameters) => &*parameters.interned(),
125+
Some(parameters) => &*parameters.interned().as_slice(),
126126
_ => &[],
127127
};
128128

crates/hir_ty/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ impl GenericArg {
282282
pub struct Substitution(SmallVec<[GenericArg; 2]>);
283283

284284
impl Substitution {
285-
pub fn interned(&self) -> &[GenericArg] {
285+
pub fn interned(&self) -> &SmallVec<[GenericArg; 2]> {
286286
&self.0
287287
}
288288

0 commit comments

Comments
 (0)