Skip to content
Failed

Changes

Summary

  1. Usage warnings can now be disabled label by label. (#11864) (commit: 8712acc) (details)
Commit 8712acc51cd7b3d83dbf0fb756511afcff5090a0 by noreply
Usage warnings can now be disabled label by label. (#11864)

This commit ensures that we read the attributes attached to fields,
constructors or extension constructors before deciding if we should
track their uses or not. For instance, the code below disables usage warnings
for the constructor "B" or the field "b":
```
type s = A | B [@warning "-unused-constructor"] | C
type r = { a: int; b:int [@warning "-unused-field"]; c:int }
type t += A | B [@warning "-unused-extension"] | C
```
(commit: 8712acc)
The file was modifiedChanges (diff)
The file was modifiedtyping/env.ml (diff)
The file was modifiedtestsuite/tests/typing-warnings/unused_types.ml (diff)