Fix return type of Substitution::interned
This commit is contained in:
parent
be0084a0bc
commit
dc116f7ce2
@ -745,7 +745,7 @@ fn write_bounds_like_dyn_trait(
|
||||
// existential) here, which is the only thing that's
|
||||
// possible in actual Rust, and hence don't print it
|
||||
write!(f, "{}", f.db.trait_data(trait_).name)?;
|
||||
if let [_, params @ ..] = &*trait_ref.substitution.interned() {
|
||||
if let [_, params @ ..] = &*trait_ref.substitution.interned().as_slice() {
|
||||
if is_fn_trait {
|
||||
if let Some(args) =
|
||||
params.first().and_then(|it| it.assert_ty_ref(&Interner).as_tuple())
|
||||
|
@ -122,7 +122,7 @@ impl<'a> InferenceContext<'a> {
|
||||
let ty = match &body[pat] {
|
||||
&Pat::Tuple { ref args, ellipsis } => {
|
||||
let expectations = match expected.as_tuple() {
|
||||
Some(parameters) => &*parameters.interned(),
|
||||
Some(parameters) => &*parameters.interned().as_slice(),
|
||||
_ => &[],
|
||||
};
|
||||
|
||||
|
@ -282,7 +282,7 @@ impl GenericArg {
|
||||
pub struct Substitution(SmallVec<[GenericArg; 2]>);
|
||||
|
||||
impl Substitution {
|
||||
pub fn interned(&self) -> &[GenericArg] {
|
||||
pub fn interned(&self) -> &SmallVec<[GenericArg; 2]> {
|
||||
&self.0
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user