Skip to content

Commit 424cc73

Browse files
authored
chore: delete bootstrapping workarounds (#14946)
This PR deletes some bootstrapping workarounds introduced in #14937 which can now be removed after the stage0 update.
1 parent 4edc42d commit 424cc73

3 files changed

Lines changed: 0 additions & 82 deletions

File tree

src/Init/Tactics.lean

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -663,34 +663,6 @@ macro (name := rwaAtLegacyLocation) (priority := low) "rwa " rws:rwRuleSeq
663663
deprecated_syntax Lean.Parser.Tactic.rwaAtLegacyLocation
664664
"use `rw [...] at ... <;> assumption` instead" (since := "2026-08-27")
665665

666-
-- TODO: remove after stage0 update
667-
-- These expansions allow the old stage0 to elaborate `rwa` while bootstrapping.
668-
macro_rules
669-
| `(tactic| rwa $rws:rwRuleSeq) => do
670-
match ← Macro.resolveGlobalName `Lean.Elab.Tactic.rwaBuiltin with
671-
| List.nil => pure ()
672-
| List.cons _ _ => Macro.throwUnsupported
673-
`(tactic|
674-
focus (
675-
rewrite $rws:rwRuleSeq
676-
focus (first
677-
| with_reducible rfl
678-
| assumption)
679-
all_goals (first | with_reducible rfl | assumption | skip)))
680-
| `(tactic| rwa $rws:rwRuleSeq at $h:term) => do
681-
match ← Macro.resolveGlobalName `Lean.Elab.Tactic.rwaBuiltin with
682-
| List.nil => pure ()
683-
| List.cons _ _ => Macro.throwUnsupported
684-
let hyp ← `(locationHyp| $h:term)
685-
let loc ← `(location| at $hyp:locationHyp)
686-
`(tactic|
687-
focus (
688-
rewrite $rws:rwRuleSeq $loc:location
689-
focus (first
690-
| with_reducible rfl
691-
| exact $h)
692-
all_goals (first | with_reducible rfl | assumption | skip)))
693-
694666
/--
695667
The `injection` tactic is based on the fact that constructors of inductive data
696668
types are injections.

src/Lean/Elab/Tactic/Rwa.lean

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ public section
1515
namespace Lean.Elab.Tactic
1616
open scoped Lean.Parser.Tactic
1717

18-
-- TODO: remove after stage0 update
19-
-- Macro elaboration cannot inspect builtin tactic registrations, so expose an internal marker.
20-
builtin_initialize
21-
registerReservedNamePredicate fun _ name => name == `Lean.Elab.Tactic.rwaBuiltin
22-
2318
/--
2419
Enables the unnecessary `rwa` linter, which reports when `rw` closes the goal without needing the
2520
final closing step.

tests/elab/rwa_builtin.lean

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)