This PR updates the styling and wording of error messages produced in inductive type declarations and anonymous constructor notation, including hints for inferable constructor visibility updates.
33 lines
721 B
Text
33 lines
721 B
Text
/-!
|
|
# Deprecate `:=` for `inductive` and `structure`
|
|
-/
|
|
|
|
set_option linter.deprecated true
|
|
|
|
/--
|
|
warning: `inductive ... :=` has been deprecated in favor of `inductive ... where`
|
|
|
|
Note: This linter can be disabled with `set_option linter.deprecated false`
|
|
-/
|
|
#guard_msgs in
|
|
inductive DogSound' :=
|
|
| woof
|
|
| grr
|
|
|
|
/--
|
|
warning: `structure ... :=` has been deprecated in favor of `structure ... where`.
|
|
|
|
Note: This linter can be disabled with `set_option linter.deprecated false`
|
|
-/
|
|
#guard_msgs in
|
|
structure S :=
|
|
(n : Nat)
|
|
|
|
/--
|
|
warning: `class ... :=` has been deprecated in favor of `class ... where`.
|
|
|
|
Note: This linter can be disabled with `set_option linter.deprecated false`
|
|
-/
|
|
#guard_msgs in
|
|
class C :=
|
|
(n : Nat)
|