Skip to content

Commit 2e6769d

Browse files
authored
chore: keep error explanations in sync (#11360)
This PR modifies some error explanations to remove warnings when building the manual.
1 parent 75d7981 commit 2e6769d

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

src/Lean/ErrorExplanations/DependsOnNoncomputable.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def endsOrDefault (ns : List Nat) : Nat × Nat :=
6363
(head, tail)
6464
```
6565
```output
66-
failed to compile definition, consider marking it as 'noncomputable' because it depends on 'propDecidable', which is 'noncomputable'
66+
failed to compile definition, consider marking it as 'noncomputable' because it depends on 'getOrDefault', which is 'noncomputable'
6767
```
6868
```lean fixed (title := "Fixed (computable)")
6969
def getOrDefault [Inhabited α] : Option α → α
@@ -96,7 +96,7 @@ def fromImage (f : Nat → Nat) (y : Nat) :=
9696
f 0
9797
```
9898
```output
99-
failed to compile definition, consider marking it as 'noncomputable' because it depends on 'Classical.propDecidable', which is 'noncomputable'
99+
failed to compile definition, consider marking it as 'noncomputable' because it depends on 'propDecidable', which is 'noncomputable'
100100
```
101101
```lean fixed
102102
open Classical in

src/Lean/ErrorExplanations/PropRecLargeElim.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Tactic `cases` failed with a nested error:
4444
Tactic `induction` failed: recursor `Nonempty.casesOn` can only eliminate into `Prop`
4545
4646
α : Type
47-
motive : Nonempty α → Sort ?u.52
47+
motive : Nonempty α → Sort ?u.48
4848
h_1 : (x : α) → motive ⋯
4949
inst✝ : Nonempty α
5050
⊢ motive inst✝
@@ -81,7 +81,7 @@ Tactic `induction` failed: recursor `Exists.casesOn` can only eliminate into `Pr
8181
8282
α : Type u
8383
p : α → Prop
84-
motive : (∃ x, p x) → Sort ?u.48
84+
motive : (∃ x, p x) → Sort ?u.52
8585
h_1 : (x : α) → (h : p x) → motive ⋯
8686
h✝ : ∃ x, p x
8787
⊢ motive h✝

src/Lean/ErrorExplanations/UnknownIdentifier.lean

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,11 @@ qualified function name.
188188
## Auto-bound variables
189189
190190
```lean broken
191-
set autoImplicit false in
191+
set_option relaxedAutoImplicit false in
192192
def thisBreaks (x : α₁) (y : size₁) := ()
193193
194-
set relaxedAutoImplicit false in
195-
def thisBreaks (x : α₂) (y : size₂) := ()
194+
set_option autoImplicit false in
195+
def thisAlsoBreaks (x : α₂) (y : size₂) := ()
196196
```
197197
```output
198198
Unknown identifier `size₁`
@@ -206,18 +206,18 @@ Unknown identifier `size₂`
206206
Note: It is not possible to treat `size₂` as an implicitly bound variable here because the `autoImplicit` option is set to `false`.
207207
```
208208
```lean fixed (title := "Fixed (modifying options)")
209-
set autoImplicit true in
210-
def thisBreaks (x : α₁) (y : size₁) := ()
209+
set_option relaxedAutoImplicit true in
210+
def thisWorks (x : α₁) (y : size₁) := ()
211211
212-
set relaxedAutoImplicit true in
213-
def thisBreaks (x : α₂) (y : size₂) := ()
212+
set_option autoImplicit true in
213+
def thisAlsoWorks (x : α₂) (y : size₂) := ()
214214
```
215215
```lean fixed (title := "Fixed (add implicit bindings for the unknown identifiers)")
216-
set autoImplicit false in
217-
def thisBreaks {size₁} (x : α₁) (y : size₁) := ()
216+
set_option relaxedAutoImplicit false in
217+
def thisWorks {size₁} (x : α₁) (y : size₁) := ()
218218
219-
set relaxedAutoImplicit false in
220-
def thisBreaks {α₂ size₂} (x : α₂) (y : size₂) := ()
219+
set_option autoImplicit false in
220+
def thisAlsoWorks {α₂ size₂} (x : α₂) (y : size₂) := ()
221221
```
222222
223223
Lean's default behavior, when it encounters an identifier it can't identify in the type of a

0 commit comments

Comments
 (0)