Much renaming and refreshing of RBE
This commit is contained in:
15
rustbyexample/types.d/alias.rs
Normal file
15
rustbyexample/types.d/alias.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
type NanoSecond = u64;
|
||||
type Inch = u64;
|
||||
type U64 = u64;
|
||||
|
||||
fn main() {
|
||||
let nanoseconds: NanoSecond = 5 as U64;
|
||||
let inches: Inch = 2 as U64;
|
||||
|
||||
println!(
|
||||
"{} nanoseconds + {} inches = {} unit?",
|
||||
nanoseconds,
|
||||
inches,
|
||||
nanoseconds + inches
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user