diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-04-14 22:07:45 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-04-16 12:31:34 -0700 |
| commit | 903cb0e3a5273f68c5c27dbfbfbe2e4c6721bd37 (patch) | |
| tree | 1318da03df0e97bdd3793b17779c3e7b294b1ff1 /src/libcore/core.rc | |
| parent | 6bb181341b05221df7b10a61eca60e6011292f52 (diff) | |
| download | rust-903cb0e3a5273f68c5c27dbfbfbe2e4c6721bd37.tar.gz rust-903cb0e3a5273f68c5c27dbfbfbe2e4c6721bd37.zip | |
core: Factor out uint/u8/16/32/64 mods into uint-template
Diffstat (limited to 'src/libcore/core.rc')
| -rw-r--r-- | src/libcore/core.rc | 53 |
1 files changed, 48 insertions, 5 deletions
diff --git a/src/libcore/core.rc b/src/libcore/core.rc index 9d07d42f2c3..3659e53e993 100644 --- a/src/libcore/core.rc +++ b/src/libcore/core.rc @@ -81,6 +81,54 @@ mod i64 { mod inst; } +#[doc = "Operations and constants for `uint`"] +#[path = "uint-template"] +mod uint { + import inst::{ + div_ceil, div_round, div_floor, hash, iterate, + next_power_of_two, parse_buf, from_str, to_str, str + }; + export div_ceil, div_round, div_floor, hash, iterate, + next_power_of_two, parse_buf, from_str, to_str, str; + + #[path = "uint.rs"] + mod inst; +} + +#[doc = "Operations and constants for `u8`"] +#[path = "uint-template"] +mod u8 { + import inst::is_ascii; + export is_ascii; + + #[path = "u8.rs"] + mod inst; +} + +#[doc = "Operations and constants for `u16`"] +#[path = "uint-template"] +mod u16 { + #[path = "u16.rs"] + mod inst; +} + +#[doc = "Operations and constants for `u32`"] +#[path = "uint-template"] +mod u32 { + #[path = "u32.rs"] + mod inst; +} + +#[doc = "Operations and constants for `u64`"] +#[path = "uint-template"] +mod u64 { + import inst::{ to_str, str, from_str }; + export to_str, str, from_str; + + #[path = "u64.rs"] + mod inst; +} + mod box; mod char; mod float; @@ -88,11 +136,6 @@ mod f32; mod f64; mod str; mod ptr; -mod uint; -mod u8; -mod u16; -mod u32; -mod u64; mod vec; mod bool; |
