mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Align FnPointer with Chalk
This commit is contained in:
parent
f25c1e7c6a
commit
edc59d897d
9 changed files with 86 additions and 40 deletions
|
@ -22,8 +22,8 @@ use crate::{
|
|||
to_chalk_trait_id,
|
||||
traits::{chalk::from_chalk, FnTrait},
|
||||
utils::{generics, variant_data, Generics},
|
||||
AdtId, Binders, CallableDefId, FnPointer, FnSig, InEnvironment, Interner, ProjectionTyExt,
|
||||
Rawness, Scalar, Substitution, TraitRef, Ty, TyBuilder, TyKind,
|
||||
AdtId, Binders, CallableDefId, FnPointer, FnSig, FnSubst, InEnvironment, Interner,
|
||||
ProjectionTyExt, Rawness, Scalar, Substitution, TraitRef, Ty, TyBuilder, TyKind,
|
||||
};
|
||||
|
||||
use super::{
|
||||
|
@ -260,9 +260,9 @@ impl<'a> InferenceContext<'a> {
|
|||
};
|
||||
sig_tys.push(ret_ty.clone());
|
||||
let sig_ty = TyKind::Function(FnPointer {
|
||||
num_args: sig_tys.len() - 1,
|
||||
num_binders: 0,
|
||||
sig: FnSig { abi: (), safety: chalk_ir::Safety::Safe, variadic: false },
|
||||
substs: Substitution::from_iter(&Interner, sig_tys.clone()),
|
||||
substitution: FnSubst(Substitution::from_iter(&Interner, sig_tys.clone())),
|
||||
})
|
||||
.intern(&Interner);
|
||||
let closure_id = self.db.intern_closure((self.owner, tgt_expr)).into();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue