mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Rewrite coercion using the new unification
This commit is contained in:
parent
84074cb185
commit
693582946f
6 changed files with 381 additions and 115 deletions
|
@ -77,15 +77,7 @@ impl TyBuilder<()> {
|
|||
}
|
||||
|
||||
pub fn fn_ptr(sig: CallableSig) -> Ty {
|
||||
TyKind::Function(FnPointer {
|
||||
num_binders: 0,
|
||||
sig: FnSig { abi: (), safety: Safety::Safe, variadic: sig.is_varargs },
|
||||
substitution: FnSubst(Substitution::from_iter(
|
||||
&Interner,
|
||||
sig.params_and_return.iter().cloned(),
|
||||
)),
|
||||
})
|
||||
.intern(&Interner)
|
||||
TyKind::Function(sig.to_fn_ptr()).intern(&Interner)
|
||||
}
|
||||
|
||||
pub fn builtin(builtin: BuiltinType) -> Ty {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue