summaryrefslogtreecommitdiff
path: root/advanced/adv-types/src/main.rs
blob: 60d42b29b0f465403bd05532b8349e8ea54f901e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//use std::io::Error;
//use std::fmt;

//pub trait Write {
//
//    fn write(&mut self, buf: &[u8]) -> Result<usize>;
//    fn flush(&mut self) -> Result<(), Error>;
//
//    fn write_all(&mut self, buf: &[u8]) -> Result<()>;
//    fn write_fmt(&mut self, fmt: fmt::Arguments) -> Result<()>;
//}

//fn main() {
//    type Miles = i32;
//
//    let x: i32 = 5;
//    let y: Miles = 5;
//
//    println!("x + y = {}", x + y);

    
//}

//type Thunk = Box<dyn Fn() + Send + 'static>;
//
//let f: Thunk = Box::new(|| println!("hi"));
//
//fn takes_long_type(f: Thunk) {
//}
//
//fn returns_long_type() -> Thunk {
//}

fn main() {
    print!("forever");

    loop {
        print!("and ever ");
    }
}