Skip to content

Commit 11476c3

Browse files
committed
chore(Tactic/FunProp): reword failure hint (#37339)
Reword ``Maybe you forgot marking `{decl}` with `@[fun_prop]`.`` to ``Consider marking `{decl}` with `@[fun_prop]`.``.
1 parent 83b8b5c commit 11476c3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Mathlib/Tactic/FunProp/Elab.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def funPropTac : Tactic
7979
unless (← getFunProp? type).isSome do
8080
let hint :=
8181
if let some n := type.getAppFn.constName?
82-
then s!" Maybe you forgot marking `{n}` with `@[fun_prop]`."
82+
then s!" Consider marking `{n}` with `@[fun_prop]`."
8383
else ""
8484
throwError "`{← ppExpr type}` is not a `fun_prop` goal!{hint}"
8585

MathlibTest/fun_prop_dev.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,11 @@ end MultipleLambdaTheorems
397397
#guard_msgs in
398398
#check_failure ((by fun_prop) : ?m)
399399

400+
/-- error: `Injective Nat.succ` is not a `fun_prop` goal!
401+
Consider marking `Function.Injective` with `@[fun_prop]`. -/
402+
#guard_msgs in
403+
example : Nat.succ.Injective := by fun_prop
404+
400405
-- todo: warning should not have mvar id in it
401406
-- /-- warning: `?m.71721` is not a `fun_prop` goal! -/
402407
-- #guard_msgs in

0 commit comments

Comments
 (0)