Skip to content

Commit bf307bc

Browse files
committed
docs: add @Alert unsafe
1 parent 4e63e5a commit bf307bc

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

builtin/option.mbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub fn Option::to_string[X : Show](self : X?) -> String {
3131

3232
///|
3333
/// Extract the value in `Some`.
34-
/// Panic if input is `None`.
34+
/// @alert unsafe "Panic if input is `None`."
3535
pub fn Option::unwrap[X](self : X?) -> X {
3636
match self {
3737
None => panic()

builtin/string.mbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ fn code_point_of_surrogate_pair(leading : Int, trailing : Int) -> Char {
7070
///
7171
/// # Panics
7272
///
73-
/// Panics if the index is out of bounds.
73+
/// @alert unsafe "Panics if the index is out of bounds."
7474
pub fn charcode_at(self : String, index : Int) -> Int {
7575
guard index >= 0 && index < self.length() else {
7676
abort("index out of bounds")

immut/priority_queue/priority_queue.mbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pub fn pop[A : Compare](self : T[A]) -> T[A]? {
127127
///|
128128
/// Pops the first value from the immutable priority queue.
129129
///
130-
/// Panics if the queue is empty.
130+
/// @alert unsafe "Panics if the queue is empty."
131131
/// # Example
132132
/// ```
133133
/// let queue = @priority_queue.of([1, 2, 3, 4])

string/string.mbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ pub fn pad_end(self : String, total_width : Int, padding_char : Char) -> String
692692
///
693693
/// # Panics
694694
///
695-
/// Panics if the index is out of bounds.
695+
/// @alert unsafe "Panics if the index is out of bounds."
696696
pub fn String::rev_get(self : String, index : Int) -> Char {
697697
guard index >= 0 else { abort("index out of bounds") }
698698
for utf16_offset = self.charcode_length() - 1, char_count = 0

0 commit comments

Comments
 (0)