aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/builder.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-05-01 20:53:10 +0100
committerFlorian Diebold <[email protected]>2021-05-21 16:48:33 +0100
commit693582946fae1813627ad59f60a31c9237e98744 (patch)
tree7c546542a5e76b8e1a958f867faddd1c04b05d07 /crates/hir_ty/src/builder.rs
parent84074cb1852aa702e1307e9533e1fa3448e3e04f (diff)
Rewrite coercion using the new unification
Diffstat (limited to 'crates/hir_ty/src/builder.rs')
-rw-r--r--crates/hir_ty/src/builder.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/crates/hir_ty/src/builder.rs b/crates/hir_ty/src/builder.rs
index e25ef866d..49d069541 100644
--- a/crates/hir_ty/src/builder.rs
+++ b/crates/hir_ty/src/builder.rs
@@ -77,15 +77,7 @@ impl TyBuilder<()> {
77 } 77 }
78 78
79 pub fn fn_ptr(sig: CallableSig) -> Ty { 79 pub fn fn_ptr(sig: CallableSig) -> Ty {
80 TyKind::Function(FnPointer { 80 TyKind::Function(sig.to_fn_ptr()).intern(&Interner)
81 num_binders: 0,
82 sig: FnSig { abi: (), safety: Safety::Safe, variadic: sig.is_varargs },
83 substitution: FnSubst(Substitution::from_iter(
84 &Interner,
85 sig.params_and_return.iter().cloned(),
86 )),
87 })
88 .intern(&Interner)
89 } 81 }
90 82
91 pub fn builtin(builtin: BuiltinType) -> Ty { 83 pub fn builtin(builtin: BuiltinType) -> Ty {