File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ let str_of_type ~options ~path ({ ptype_loc = loc } as type_decl) =
194
194
conflicts with a Stdlib type from Ppx_deriving_runtime (e.g. bool in test).
195
195
In that case we must refer to the type being declared, not the one opened by Ppx_deriving_runtime. *)
196
196
let helper_type =
197
- Type. mk ~loc ~attrs: [ Ppx_deriving. attr_warning [ % expr " -unused-type-declaration " ]]
197
+ Type. mk ~loc
198
198
~params: type_decl.ptype_params
199
199
~manifest: (Ppx_deriving. core_type_of_type_decl type_decl)
200
200
(mkloc " t" loc)
@@ -258,7 +258,12 @@ let str_of_type ~options ~path ({ ptype_loc = loc } as type_decl) =
258
258
let out_var =
259
259
pvar (Ppx_deriving. mangle_type_decl (`Prefix " compare" ) type_decl) in
260
260
let comparator_with_helper =
261
- [% expr let module Ppx_deriving_ord_helper = struct [%% i Str. type_ Nonrecursive [helper_type]] end in
261
+ [% expr let module Ppx_deriving_ord_helper =
262
+ struct
263
+ [@@@ warning " -unused-type-declaration" ]
264
+ [%% i Str. type_ Nonrecursive [helper_type]]
265
+ end
266
+ in
262
267
[% e Ppx_deriving. sanitize ~quoter (eta_expand (polymorphize comparator))]]
263
268
in
264
269
[Vb. mk ~attrs: [Ppx_deriving. attr_warning [% expr " -39" ]]
You can’t perform that action at this time.
0 commit comments