Skip to content

Commit 990c7b5

Browse files
committed
fixed(moonbase): declare the derived impls, which the newer compiler no longer promotes.
Signed-off-by: Leo Cheng (heke1228) <chengkelfan@qq.com>
1 parent b3c4710 commit 990c7b5

10 files changed

Lines changed: 54 additions & 0 deletions

File tree

base16/base16.mbt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ pub(all) enum Kind {
1010
Upper
1111
} derive(Eq, Debug)
1212

13+
///|
14+
pub extend Kind with Eq::{equal, not_equal}
15+
16+
///|
17+
pub extend Kind with Debug::{to_repr}
18+
1319
///|
1420
/// Encode bytes as hexadecimal (RFC 4648 §8).
1521
///

base16/pkg.generated.mbti

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ pub(all) enum Kind {
2626
Lower
2727
Upper
2828
} derive(Eq, @debug.Debug)
29+
pub fn Kind::equal(Self, Self) -> Bool
30+
pub fn Kind::not_equal(Self, Self) -> Bool
31+
pub fn Kind::to_repr(Self) -> @debug.Repr
2932

3033
// Type aliases
3134

base32/base32.mbt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ pub(all) enum Kind {
99
Hex
1010
} derive(Eq, Debug)
1111

12+
///|
13+
pub extend Kind with Eq::{equal, not_equal}
14+
15+
///|
16+
pub extend Kind with Debug::{to_repr}
17+
1218
///|
1319
/// Encode bytes as base32 (RFC 4648 §6, or §7 with `kind=Hex`).
1420
///

base32/pkg.generated.mbti

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ pub(all) enum Kind {
2424
Std
2525
Hex
2626
} derive(Eq, @debug.Debug)
27+
pub fn Kind::equal(Self, Self) -> Bool
28+
pub fn Kind::not_equal(Self, Self) -> Bool
29+
pub fn Kind::to_repr(Self) -> @debug.Repr
2730

2831
// Type aliases
2932

base36/base36.mbt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ pub(all) enum Kind {
88
Upper
99
} derive(Eq, Debug)
1010

11+
///|
12+
pub extend Kind with Eq::{equal, not_equal}
13+
14+
///|
15+
pub extend Kind with Debug::{to_repr}
16+
1117
///|
1218
/// The lower-case alphabet, which is the one everything defaults to.
1319
pub let alphabet : @moonbase.Alphabet = @moonbase.Alphabet::of(

base36/pkg.generated.mbti

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ pub(all) enum Kind {
3232
Lower
3333
Upper
3434
} derive(Eq, @debug.Debug)
35+
pub fn Kind::equal(Self, Self) -> Bool
36+
pub fn Kind::not_equal(Self, Self) -> Bool
37+
pub fn Kind::to_repr(Self) -> @debug.Repr
3538

3639
// Type aliases
3740

base64/base64.mbt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ pub(all) enum Kind {
99
Url
1010
} derive(Eq, Debug)
1111

12+
///|
13+
pub extend Kind with Eq::{equal, not_equal}
14+
15+
///|
16+
pub extend Kind with Debug::{to_repr}
17+
1218
///|
1319
/// Encode bytes as base64 (RFC 4648 §4, or §5 with `kind=Url`).
1420
///

base64/pkg.generated.mbti

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ pub(all) enum Kind {
2626
Std
2727
Url
2828
} derive(Eq, @debug.Debug)
29+
pub fn Kind::equal(Self, Self) -> Bool
30+
pub fn Kind::not_equal(Self, Self) -> Bool
31+
pub fn Kind::to_repr(Self) -> @debug.Repr
2932

3033
// Type aliases
3134

error.mbt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ pub(all) suberror Malformed {
1919
Checksum(at~ : Int)
2020
} derive(Eq, Debug)
2121

22+
///|
23+
pub extend Malformed with Eq::{equal, not_equal}
24+
25+
///|
26+
pub extend Malformed with Debug::{to_repr}
27+
2228
///|
2329
/// Why an alphabet could not be built.
2430
///
@@ -32,3 +38,9 @@ pub(all) suberror BadAlphabet {
3238
/// Fewer than two digits, which is not a positional system.
3339
TooFew(count~ : Int)
3440
} derive(Eq, Debug)
41+
42+
///|
43+
pub extend BadAlphabet with Eq::{equal, not_equal}
44+
45+
///|
46+
pub extend BadAlphabet with Debug::{to_repr}

pkg.generated.mbti

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,19 @@ pub(all) suberror BadAlphabet {
4242
Repeated(at~ : Int, char~ : Char)
4343
TooFew(count~ : Int)
4444
} derive(Eq, @debug.Debug)
45+
pub fn BadAlphabet::equal(Self, Self) -> Bool
46+
pub fn BadAlphabet::not_equal(Self, Self) -> Bool
47+
pub fn BadAlphabet::to_repr(Self) -> @debug.Repr
4548

4649
pub(all) suberror Malformed {
4750
Bad(at~ : Int, char~ : Char)
4851
Truncated(at~ : Int)
4952
Padding(at~ : Int)
5053
Checksum(at~ : Int)
5154
} derive(Eq, @debug.Debug)
55+
pub fn Malformed::equal(Self, Self) -> Bool
56+
pub fn Malformed::not_equal(Self, Self) -> Bool
57+
pub fn Malformed::to_repr(Self) -> @debug.Repr
5258

5359
// Types and methods
5460
pub struct Alphabet {

0 commit comments

Comments
 (0)