Skip to content

Commit 2c7a2ab

Browse files
bobzhangSeekMoon
andcommitted
Remove stale deprecated warning suppressions in strconv doc examples
The parse_* functions are deprecated with skip_current_package=true, so in-package doc examples never triggered the deprecation warning. Co-Authored-By: SeekMoon <noreply@moonbitlang.cn>
1 parent 911823b commit 2c7a2ab

4 files changed

Lines changed: 0 additions & 8 deletions

File tree

strconv/README.mbt.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Parse integers in various bases:
1010

1111
```mbt check
1212
///|
13-
#warnings("-deprecated")
1413
test "parse_int" {
1514
inspect(@strconv.parse_int("42"), content="42")
1615
inspect(@strconv.parse_int("101", base=2), content="5")
@@ -22,7 +21,6 @@ Parse 64-bit integers and unsigned integers:
2221

2322
```mbt check
2423
///|
25-
#warnings("-deprecated")
2624
test "parse_int64_uint" {
2725
inspect(
2826
@strconv.parse_int64("9223372036854775807"),
@@ -40,7 +38,6 @@ test "parse_int64_uint" {
4038

4139
```mbt check
4240
///|
43-
#warnings("-deprecated")
4441
test "parse_other" {
4542
inspect(@strconv.parse_bool("true"), content="true")
4643
inspect(@strconv.parse_double("3.14"), content="3.14")
@@ -54,7 +51,6 @@ Use `@string.from_str` in new code.
5451

5552
```mbt check
5653
///|
57-
#warnings("-deprecated")
5854
test "from_str" {
5955
let i : Int = @strconv.from_str("123")
6056
inspect(i, content="123")
@@ -75,7 +71,6 @@ Use the `@string` versions in new code.
7571

7672
```mbt check
7773
///|
78-
#warnings("-deprecated")
7974
test "error_handling" {
8075
let result : Result[Int, _] = try? @strconv.parse_int("abc")
8176
inspect(result is Err(_), content="true")

strconv/double.mbt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ let max_mantissa_fast_path : UInt64 = 2UL << mantissa_explicit_bits
5757
///
5858
/// Examples:
5959
/// ```mbt check
60-
/// #warnings("-deprecated")
6160
/// test {
6261
/// inspect(@strconv.parse_double("123"), content="123")
6362
/// inspect(@strconv.parse_double("12.34"), content="12.34")

strconv/int.mbt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ test {
7070
/// These underscores do not affect the value.
7171
/// Examples:
7272
/// ```mbt check
73-
/// #warnings("-deprecated")
7473
/// test {
7574
/// inspect(@strconv.parse_int64("123"), content="123")
7675
/// inspect(@strconv.parse_int64("0xff", base=0), content="255")

strconv/uint.mbt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const UINT64_MAX : UInt64 = 0xffffffffffffffffUL
3030
/// These underscores do not affect the value.
3131
/// Examples:
3232
/// ```mbt check
33-
/// #warnings("-deprecated")
3433
/// test {
3534
/// inspect(@strconv.parse_uint64("123"), content="123")
3635
/// inspect(@strconv.parse_uint64("0xff", base=0), content="255")

0 commit comments

Comments
 (0)