rust/tests/ui/error-codes/E0277.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
257 B
Rust
Raw Normal View History

use std::path::Path;
2016-08-05 20:18:01 +00:00
trait Foo {
fn bar(&self);
}
fn some_func<T: Foo>(foo: T) {
foo.bar();
}
fn f(p: Path) { }
2018-07-10 21:10:13 +00:00
//~^ ERROR the size for values of type
2016-08-05 20:18:01 +00:00
fn main() {
some_func(5i32);
//~^ ERROR the trait bound `i32: Foo` is not satisfied
2016-08-05 20:18:01 +00:00
}