mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
18 lines
257 B
Rust
18 lines
257 B
Rust
use std::path::Path;
|
|
|
|
trait Foo {
|
|
fn bar(&self);
|
|
}
|
|
|
|
fn some_func<T: Foo>(foo: T) {
|
|
foo.bar();
|
|
}
|
|
|
|
fn f(p: Path) { }
|
|
//~^ ERROR the size for values of type
|
|
|
|
fn main() {
|
|
some_func(5i32);
|
|
//~^ ERROR the trait bound `i32: Foo` is not satisfied
|
|
}
|