trait Say {
    fn say(&self);
}

struct Dog {}

impl Say for Dog {
    fn say(&self) {
        println!("Wangwang!");
    }
}

fn do_say<T>(s: T) where T: Say {
    s.say();
}

// fn do_say2<T: Say>(s: T) {
//     s.say();
// }

fn main() {
    let dog = Dog {};
    do_say(dog);
}