diff --git a/theories/proofmode/ltac_tactics.v b/theories/proofmode/ltac_tactics.v
index 131541b51d4ec00d69bcc3390ab75bad055026cd..05fd8521a76fe44ad4eafd73a67909fdd62124e0 100644
--- a/theories/proofmode/ltac_tactics.v
+++ b/theories/proofmode/ltac_tactics.v
@@ -570,7 +570,8 @@ Local Tactic Notation "iForallRevert" ident(x) :=
     intros x;
     iMatchHyp (fun H P =>
       lazymatch P with
-      | context [x] => fail 2 "iRevert:" x "is used in hypothesis" H
+      | context [x] =>
+         let H := pretty_ident H in fail 2 "iRevert:" x "is used in hypothesis" H
       end) in
   iStartProof;
   first [let _ := type of x in idtac|fail 1 "iRevert:" x "not in scope"];