File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1463,7 +1463,11 @@ Some attributes are understood by the type-checker:
1463
1463
Can be applied to most kind of items in signatures or
1464
1464
structures. When the element is later referenced, a warning (3) is
1465
1465
triggered. If the payload of the attribute is a string literal,
1466
- the warning message includes this text.
1466
+ the warning message includes this text. It is also possible
1467
+ to use this ``ocaml.deprecated'' as a floating attribute
1468
+ on top of an ``.mli'' file (i.e. before any other non-attribute
1469
+ item) or on top of an ``.ml'' file without a corresponding
1470
+ interface; this marks the unit itself as being deprecated.
1467
1471
\item
1468
1472
``ocaml.ppwarning'' or ``ppwarning'', in any context, with
1469
1473
a string literal payload. The text is reported as warning (22)
@@ -1478,6 +1482,7 @@ module X = struct
1478
1482
[@@@warning "+9"] (* locally enable warning 9 in this structure *)
1479
1483
...
1480
1484
end
1485
+ [@@deprecated "Please is module 'Y' instead."]
1481
1486
1482
1487
let x = begin[@warning "+9] ... end in ....
1483
1488
You can’t perform that action at this time.
0 commit comments