Skip to content

Commit 4397089

Browse files
committed
remove unused code
1 parent 9525c42 commit 4397089

File tree

5 files changed

+2
-20
lines changed

5 files changed

+2
-20
lines changed

jscomp/ml/cmi_format.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type pers_flags =
1717
| Rectypes
1818
| Deprecated of string
1919
| Opaque
20-
| Unsafe_string
20+
2121

2222
type error =
2323
Not_an_interface of string

jscomp/ml/cmi_format.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type pers_flags =
1717
| Rectypes
1818
| Deprecated of string
1919
| Opaque
20-
| Unsafe_string
20+
2121

2222
type cmi_infos = {
2323
cmi_name : string;

jscomp/ml/env.ml

-12
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ type error =
6161
| Illegal_renaming of string * string * string
6262
| Inconsistent_import of string * string * string
6363
| Need_recursive_types of string * string
64-
| Depend_on_unsafe_string_unit of string * string
6564
| Missing_module of Location.t * Path.t * Path.t
6665
| Illegal_value_name of Location.t * string
6766

@@ -691,7 +690,6 @@ let save_pers_struct crc ps =
691690
(function
692691
| Rectypes -> ()
693692
| Deprecated _ -> ()
694-
| Unsafe_string -> ()
695693
| Opaque -> add_imported_opaque modname)
696694
ps.ps_flags;
697695
Consistbl.set crc_units modname crc ps.ps_filename;
@@ -738,8 +736,6 @@ let acknowledge_pers_struct check modname
738736
(function
739737
| Rectypes ->
740738
error (Need_recursive_types(ps.ps_name, !current_unit))
741-
| Unsafe_string ->
742-
error (Depend_on_unsafe_string_unit (ps.ps_name, !current_unit));
743739
| Deprecated _ -> ()
744740
| Opaque -> add_imported_opaque modname)
745741
ps.ps_flags;
@@ -797,9 +793,6 @@ let check_pers_struct name =
797793
Format.sprintf
798794
"%s uses recursive types"
799795
name
800-
| Depend_on_unsafe_string_unit (name, _) ->
801-
Printf.sprintf "%s uses -unsafe-string"
802-
name
803796
| Missing_module _ -> assert false
804797
| Illegal_value_name _ -> assert false
805798
in
@@ -2317,11 +2310,6 @@ let report_error ppf = function
23172310
fprintf ppf
23182311
"@[<hov>Unit %s imports from %s, which uses recursive types.@ %s@]"
23192312
export import "The compilation flag -rectypes is required"
2320-
| Depend_on_unsafe_string_unit(import, export) ->
2321-
fprintf ppf
2322-
"@[<hov>Unit %s imports from %s, compiled with -unsafe-string.@ %s@]"
2323-
export import "This compiler has been configured in strict \
2324-
safe-string mode (-force-safe-string)"
23252313
| Missing_module(_, path1, path2) ->
23262314
fprintf ppf "@[@[<hov>";
23272315
if Path.same path1 path2 then

jscomp/ml/env.mli

-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ type error =
236236
| Illegal_renaming of string * string * string
237237
| Inconsistent_import of string * string * string
238238
| Need_recursive_types of string * string
239-
| Depend_on_unsafe_string_unit of string * string
240239
| Missing_module of Location.t * Path.t * Path.t
241240
| Illegal_value_name of Location.t * string
242241

jscomp/super_errors/super_env.ml

-5
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ let report_error ppf = function
2323
fprintf ppf
2424
"@[<hov>Unit %s imports from %s, which uses recursive types.@ %s@]"
2525
export import "The compilation flag -rectypes is required"
26-
| Depend_on_unsafe_string_unit(import, export) ->
27-
fprintf ppf
28-
"@[<hov>Unit %s imports from %s, compiled with -unsafe-string.@ %s@]"
29-
export import "This compiler has been configured in strict \
30-
safe-string mode (-force-safe-string)"
3126
| Missing_module(_, path1, path2) ->
3227
fprintf ppf "@[@[<hov>";
3328
if Path.same path1 path2 then

0 commit comments

Comments
 (0)