Skip to content

Commit

Permalink
Merge PR coq#17746: Adapt examples in deprecation warning attribute d…
Browse files Browse the repository at this point in the history
…ocumentation.

Reviewed-by: jfehrle
Reviewed-by: proux01
Co-authored-by: proux01 <proux01@users.noreply.github.com>
  • Loading branch information
coqbot-app[bot] and proux01 committed Jun 20, 2023
2 parents 75dd67e + 3541ef9 commit fd03bf8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions doc/sphinx/using/libraries/writing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ deprecated compatibility alias using :cmd:`Notation (abbreviation)`

At least one of :n:`since` or :n:`note` must be present. If both
are present, either one may appear first and they must be separated
by a comma. If :n:`since` is present, it will be used in the warning name.
by a comma. If they are present, they will be used in the warning
message, and :n:`since` will also be used in the warning name and
categories.

This attribute is supported by the following commands: :cmd:`Ltac`,
:cmd:`Tactic Notation`, :cmd:`Notation`, :cmd:`Infix`, :cmd:`Ltac2`,
Expand Down Expand Up @@ -57,7 +59,7 @@ deprecated compatibility alias using :cmd:`Notation (abbreviation)`

.. coqtop:: all abort warn

#[deprecated(since="0.9", note="Use idtac instead.")]
#[deprecated(since="mylib 0.9", note="Use idtac instead.")]
Ltac foo := idtac.
Goal True.
Proof.
Expand All @@ -80,7 +82,7 @@ deprecated compatibility alias using :cmd:`Notation (abbreviation)`
.. coqtop:: in reset

Definition bar x := S x.
#[deprecated(since="1.2", note="Use bar instead.")]
#[deprecated(since="mylib 1.2", note="Use bar instead.")]
Notation foo := bar (only parsing).

Then, the following code still works, but emits a warning:
Expand Down

0 comments on commit fd03bf8

Please sign in to comment.