diff --git a/engine/lib/ast.ml b/engine/lib/ast.ml index 82c5fb119..10cc44808 100644 --- a/engine/lib/ast.ml +++ b/engine/lib/ast.ml @@ -145,9 +145,6 @@ functor | ImplApp of { impl : impl_expr; args : impl_expr list } | Dyn | Builtin of trait_goal - | FnPointer of ty - (* The `IE` suffix is there because visitors conflicts...... *) - | ClosureIE of todo and trait_goal = { trait : concrete_ident; args : generic_value list } (** A fully applied trait: [Foo] (or diff --git a/engine/lib/ast_visitors.ml b/engine/lib/ast_visitors.ml index dcf12c9a1..1f9ce20f7 100644 --- a/engine/lib/ast_visitors.ml +++ b/engine/lib/ast_visitors.ml @@ -176,12 +176,6 @@ functor | Builtin x0 -> let x0 = self#visit_trait_goal env x0 in Builtin x0 - | FnPointer x0 -> - let x0 = self#visit_ty env x0 in - FnPointer x0 - | ClosureIE x0 -> - let x0 = self#visit_todo env x0 in - ClosureIE x0 method visit_trait_goal (env : 'env) (this : trait_goal) : trait_goal = let trait = self#visit_concrete_ident env this.trait in @@ -1115,12 +1109,6 @@ functor | Builtin x0 -> let x0, reduce_acc = self#visit_trait_goal env x0 in (Builtin x0, reduce_acc) - | FnPointer x0 -> - let x0, reduce_acc = self#visit_ty env x0 in - (FnPointer x0, reduce_acc) - | ClosureIE x0 -> - let x0, reduce_acc = self#visit_todo env x0 in - (ClosureIE x0, reduce_acc) method visit_trait_goal (env : 'env) (this : trait_goal) : trait_goal * 'acc = @@ -2301,12 +2289,6 @@ functor | Builtin x0 -> let reduce_acc = self#visit_trait_goal env x0 in reduce_acc - | FnPointer x0 -> - let reduce_acc = self#visit_ty env x0 in - reduce_acc - | ClosureIE x0 -> - let reduce_acc = self#visit_todo env x0 in - reduce_acc method visit_trait_goal (env : 'env) (this : trait_goal) : 'acc = let reduce_acc = self#visit_concrete_ident env this.trait in diff --git a/engine/lib/import_thir.ml b/engine/lib/import_thir.ml index 95b73ccf3..2a515162b 100644 --- a/engine/lib/import_thir.ml +++ b/engine/lib/import_thir.ml @@ -991,8 +991,6 @@ end) : EXPR = struct | Dyn -> Dyn | SelfImpl { path; _ } -> List.fold ~init:Self ~f:browse_path path | Builtin { trait } -> Builtin (c_trait_ref span trait) - | FnPointer { fn_ty } -> FnPointer (c_ty span fn_ty) - | Closure _ as x -> ClosureIE ([%show: Thir.impl_expr_atom] x) | Todo str -> failwith @@ "impl_expr_atom: Todo " ^ str and c_generic_value (span : Thir.span) (ty : Thir.generic_arg) : generic_value diff --git a/engine/lib/subtype.ml b/engine/lib/subtype.ml index 835861fda..76c2db4b9 100644 --- a/engine/lib/subtype.ml +++ b/engine/lib/subtype.ml @@ -72,8 +72,6 @@ struct } | Dyn -> Dyn | Builtin tr -> Builtin (dtrait_goal span tr) - | ClosureIE todo -> ClosureIE todo - | FnPointer ty -> FnPointer (dty span ty) and dgeneric_value (span : span) (generic_value : A.generic_value) : B.generic_value = diff --git a/frontend/exporter/src/traits.rs b/frontend/exporter/src/traits.rs index b1e7ce4d8..bc6ac4b71 100644 --- a/frontend/exporter/src/traits.rs +++ b/frontend/exporter/src/traits.rs @@ -50,17 +50,6 @@ pub enum ImplExprAtom { Dyn, /// A built-in trait whose implementation is computed by the compiler, such as `Sync`. Builtin { r#trait: TraitRef }, - /// Function pointer types (e.g. `fn(bool, u32) -> u32`) automaticlaly implement some traits - /// such as `Copy` and the appropriate `Fn` traits. - /// FIXME: currently unused because rustc no longer identifies those explicitly. - FnPointer { fn_ty: Box }, - /// Closures automatically implement the appropriate `Fn` traits. - /// FIXME: currently unused because rustc no longer identifies those explicitly. - Closure { - closure_def_id: DefId, - parent_substs: Vec, - signature: Box, - }, /// Anything else. Currently used for trait upcasting and trait aliases. Todo(String), }