diff --git a/src/Init/Data/List/BasicAux.lean b/src/Init/Data/List/BasicAux.lean index 551cb48bea..566881697f 100644 --- a/src/Init/Data/List/BasicAux.lean +++ b/src/Init/Data/List/BasicAux.lean @@ -165,7 +165,6 @@ theorem append_cancel_right {as bs cs : List α} (h : as ++ bs = cs ++ bs) : as apply Nat.lt_trans ih simp_arith -set_option linter.unusedVariables.funArgs false in -- #1214 theorem le_antisymm [LT α] [s : Antisymm (¬ · < · : α → α → Prop)] {as bs : List α} (h₁ : as ≤ bs) (h₂ : bs ≤ as) : as = bs := match as, bs with | [], [] => rfl diff --git a/src/Init/Prelude.lean b/src/Init/Prelude.lean index f3e8a62d9a..1bd93fc377 100644 --- a/src/Init/Prelude.lean +++ b/src/Init/Prelude.lean @@ -789,7 +789,6 @@ protected theorem Nat.lt_irrefl (n : Nat) : Not (LT.lt n n) := protected theorem Nat.lt_of_le_of_lt {n m k : Nat} (h₁ : LE.le n m) (h₂ : LT.lt m k) : LT.lt n k := Nat.le_trans (Nat.succ_le_succ h₁) h₂ -set_option linter.unusedVariables.funArgs false in -- #1214 protected theorem Nat.le_antisymm {n m : Nat} (h₁ : LE.le n m) (h₂ : LE.le m n) : Eq n m := match h₁ with | Nat.le.refl => rfl @@ -800,7 +799,6 @@ protected theorem Nat.lt_of_le_of_ne {n m : Nat} (h₁ : LE.le n m) (h₂ : Not | Or.inl h₃ => h₃ | Or.inr h₃ => absurd (Nat.le_antisymm h₁ h₃) h₂ -set_option linter.unusedVariables.funArgs false in -- #1214 theorem Nat.le_of_ble_eq_true (h : Eq (Nat.ble n m) true) : LE.le n m := match n, m with | 0, _ => Nat.zero_le _ diff --git a/src/Init/Util.lean b/src/Init/Util.lean index e74e17a2f5..7c7b3a2781 100644 --- a/src/Init/Util.lean +++ b/src/Init/Util.lean @@ -8,16 +8,17 @@ import Init.Data.String.Basic import Init.Data.ToString.Basic universe u v -set_option linter.unusedVariables.funArgs false /-! # Debugging helper functions -/ +set_option linter.unusedVariables.funArgs false in @[neverExtract, extern "lean_dbg_trace"] def dbgTrace {α : Type u} (s : String) (f : Unit → α) : α := f () def dbgTraceVal {α : Type u} [ToString α] (a : α) : α := dbgTrace (toString a) (fun _ => a) +set_option linter.unusedVariables.funArgs false in /-- Display the given message if `a` is shared, that is, RC(a) > 1 -/ @[neverExtract, extern "lean_dbg_trace_if_shared"] def dbgTraceIfShared {α : Type u} (s : String) (a : α) : α := a @@ -40,6 +41,7 @@ def dbgSleep {α : Type u} (ms : UInt32) (f : Unit → α) : α := f () @[extern "lean_ptr_addr"] unsafe def ptrAddrUnsafe {α : Type u} (a : @& α) : USize := 0 +set_option linter.unusedVariables.funArgs false in @[inline] unsafe def withPtrAddrUnsafe {α : Type u} {β : Type v} (a : α) (k : USize → β) (h : ∀ u₁ u₂, k u₁ = k u₂) : β := k (ptrAddrUnsafe a) @@ -50,6 +52,7 @@ unsafe def ptrEqList : (as bs : List α) → Bool | a::as, b::bs => if ptrEq a b then ptrEqList as bs else false | _, _ => false +set_option linter.unusedVariables.funArgs false in @[inline] unsafe def withPtrEqUnsafe {α : Type u} (a b : α) (k : Unit → Bool) (h : a = b → k () = true) : Bool := if ptrEq a b then true else k () diff --git a/src/Std/Data/HashMap.lean b/src/Std/Data/HashMap.lean index 72a548517c..e9cecaeb86 100644 --- a/src/Std/Data/HashMap.lean +++ b/src/Std/Data/HashMap.lean @@ -64,7 +64,6 @@ def findEntry? [BEq α] [Hashable α] (m : HashMapImp α β) (a : α) : Option ( let ⟨i, h⟩ := mkIdx buckets.property (hash a |>.toUSize) buckets.val[i].findEntry? a -set_option linter.unusedVariables false in -- #1214 def find? [beq : BEq α] [Hashable α] (m : HashMapImp α β) (a : α) : Option β := match m with | ⟨_, buckets⟩ => @@ -95,7 +94,6 @@ def expand [Hashable α] (size : Nat) (buckets : HashMapBucket α β) : HashMapI { size := size, buckets := moveEntries 0 buckets.val new_buckets } -set_option linter.unusedVariables false in -- #1214 @[inline] def insert [beq : BEq α] [Hashable α] (m : HashMapImp α β) (a : α) (b : β) : HashMapImp α β × Bool := match m with | ⟨size, buckets⟩ =>