parent
dc8045a20e
commit
7f4f627769
@ -1,11 +1,6 @@
|
||||
/custom_types/*
|
||||
/hello/*
|
||||
/primitives/*
|
||||
/variable_bindings/*
|
||||
/types/*
|
||||
/*.d/*
|
||||
hello
|
||||
primitives
|
||||
variable_bindings
|
||||
|
||||
!/custom_types/*.rs
|
||||
!/hello/*.rs
|
||||
!/primitives/*.rs
|
||||
!/variable_bindings/*.rs
|
||||
!/types/*.rs
|
||||
!/*.d/*.rs
|
||||
|
@ -1,3 +1,4 @@
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug)]
|
||||
struct Person {
|
||||
name: String,
|
@ -1,3 +1,5 @@
|
||||
#[allow(unused_variables)]
|
||||
#[allow(unused_assignments)]
|
||||
fn main() {
|
||||
let logical: bool = true;
|
||||
|
@ -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
|
||||
);
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
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…
Reference in new issue