feat: allow the compiler to optimize unsafeCast
This commit is contained in:
parent
5cdaeac36f
commit
bc5bd5a671
1 changed files with 1 additions and 2 deletions
|
|
@ -1139,9 +1139,8 @@ def String.utf8ByteSize : (@& String) → Nat
|
|||
stopPos := s.bsize
|
||||
}
|
||||
|
||||
@[extern c inline "#3"]
|
||||
unsafe def unsafeCast {α : Type u} {β : Type v} (a : α) : β :=
|
||||
cast lcProof (PUnit.{v})
|
||||
ULift.down.{max u v} (cast lcProof (ULift.up.{max u v} a))
|
||||
|
||||
@[neverExtract, extern "lean_panic_fn"]
|
||||
constant panicCore {α : Type u} [Inhabited α] (msg : String) : α
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue