RBE types aliasing

cat-town
Dan Buch 3 years ago
parent b25e99a632
commit 6c45a1390b
Signed by: meatballhat
GPG Key ID: 9685130D8B763EA7

@ -0,0 +1,15 @@
type NanoSecond = u64;
type Inch = u64;
#[allow(non_camel_case_types)]
type u64_t = u64;
fn main() {
let nanoseconds: NanoSecond = 5 as u64_t;
let inches: Inch = 2 as u64_t;
println!("{} nanoseconds + {} inches = {} unit?",
nanoseconds,
inches,
nanoseconds + inches);
}
Loading…
Cancel
Save