fix(library/init/data/array/basic): incorrect borrow annotation
This commit is contained in:
parent
19856c4ca7
commit
568b598729
1 changed files with 1 additions and 1 deletions
|
|
@ -87,7 +87,7 @@ def update (a : Array α) (i : @& Fin a.sz) (v : α) : Array α :=
|
|||
`Fin` values are represented as tag pointers in the Lean runtime. Thus,
|
||||
`update` may be slightly slower than `updt`. -/
|
||||
@[extern cpp inline "lean::array_updt(#2, #3, #4)"]
|
||||
def updt (a : @& Array α) (i : USize) (v : @& α) (h : i.toNat < a.sz) : Array α :=
|
||||
def updt (a : Array α) (i : USize) (v : α) (h : i.toNat < a.sz) : Array α :=
|
||||
a.update ⟨i.toNat, h⟩ v
|
||||
|
||||
/- "Comfortable" version of `update`. It performs a bound check at runtime. -/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue