File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,15 @@ let attr_order a1 a2 =
37
37
| n -> n
38
38
39
39
let warn_unused () =
40
- let keys = List. of_seq (Attribute_table. to_seq_keys unused_attrs) in
41
- let keys = List. sort attr_order keys in
42
- List. iter (fun sloc ->
43
- Location. prerr_warning sloc.loc (Warnings. Misplaced_attribute sloc.txt))
44
- keys
40
+ (* When using -i, attributes will not have been translated, so we can't
41
+ warn about missing ones. *)
42
+ if ! Clflags. print_types then ()
43
+ else
44
+ let keys = List. of_seq (Attribute_table. to_seq_keys unused_attrs) in
45
+ let keys = List. sort attr_order keys in
46
+ List. iter (fun sloc ->
47
+ Location. prerr_warning sloc.loc (Warnings. Misplaced_attribute sloc.txt))
48
+ keys
45
49
46
50
(* These are the attributes that are tracked in the builtin_attrs table for
47
51
misplaced attribute warnings. Explicitly excluded is [deprecated_mutable],
You can’t perform that action at this time.
0 commit comments