File tree Expand file tree Collapse file tree 2 files changed +8
-16
lines changed
Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -631,4 +631,12 @@ def Slice.Pos.byte {s : Slice} (pos : s.Pos) (h : pos ≠ s.endPos) : UInt8 :=
631631theorem push_eq_append (c : Char) : String.push s c = s ++ singleton c := by
632632 simp
633633
634+ @[deprecated String.toRawSubstring (since := "2025-11-18")]
635+ def toSubstring (s : String) : Substring.Raw :=
636+ s.toRawSubstring
637+
638+ @[deprecated String.toRawSubstring' (since := "2025-11-18")]
639+ def toSubstring' (s : String) : Substring.Raw :=
640+ s.toRawSubstring'
641+
634642end String
Original file line number Diff line number Diff line change @@ -3517,14 +3517,6 @@ Converts a `String` into a `Substring` that denotes the entire string.
35173517 startPos := {}
35183518 stopPos := s.rawEndPos
35193519
3520- /--
3521- Converts a `String` into a `Substring` that denotes the entire string.
3522- -/
3523- @[inline] def String.toSubstring (s : String) : Substring.Raw where
3524- str := s
3525- startPos := {}
3526- stopPos := s.rawEndPos
3527-
35283520/--
35293521Converts a `String` into a `Substring` that denotes the entire string.
35303522
@@ -3533,14 +3525,6 @@ This is a version of `String.toRawSubstring` that doesn't have an `@[inline]` an
35333525def String.toRawSubstring' (s : String) : Substring.Raw :=
35343526 s.toRawSubstring
35353527
3536- /--
3537- Converts a `String` into a `Substring` that denotes the entire string.
3538-
3539- This is a version of `String.toRawSubstring` that doesn't have an `@[inline]` annotation.
3540- -/
3541- def String.toSubstring' (s : String) : Substring.Raw :=
3542- s.toRawSubstring
3543-
35443528/--
35453529This function will cast a value of type `α` to type `β`, and is a no-op in the
35463530compiler. This function is **extremely dangerous** because there is no guarantee
You can’t perform that action at this time.
0 commit comments