2016-12-03 17:41:14 -08:00
|
|
|
use std::path::Path;
|
|
|
|
|
|
2016-08-05 22:18:01 +02:00
|
|
|
trait Foo {
|
|
|
|
|
fn bar(&self);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn some_func<T: Foo>(foo: T) {
|
|
|
|
|
foo.bar();
|
|
|
|
|
}
|
|
|
|
|
|
2016-12-03 17:41:14 -08:00
|
|
|
fn f(p: Path) { }
|
2018-07-10 23:10:13 +02:00
|
|
|
//~^ ERROR the size for values of type
|
2016-12-03 17:41:14 -08:00
|
|
|
|
2016-08-05 22:18:01 +02:00
|
|
|
fn main() {
|
2016-08-25 18:26:04 +05:30
|
|
|
some_func(5i32);
|
|
|
|
|
//~^ ERROR the trait bound `i32: Foo` is not satisfied
|
2016-08-05 22:18:01 +02:00
|
|
|
}
|