Closed
Description
Ideally something like this would work, but it currently doesn't:
trait Foo {}
impl Foo for i32 {}
struct Baz;
fn foo<F: Foo>(f: F) {}
fn main() {
foo(10);
}
test.rs:11:5: 11:8 error: cannot determine the type of this integer; add a suffix to specify the type explicitly
test.rs:11 foo(10);
^~~
test.rs:11:5: 11:8 error: failed to find an implementation of trait Foo for int
test.rs:11 foo(10);
^~~
Metadata
Metadata
Assignees
Labels
No labels