blob: 15c52f461c1837371161d366c602898eddc97875 [file] [log] [blame]
error[E0308]: mismatched types
--> $DIR/type_inference.rs:21:14
|
LL | only_foo(x);
| ^ expected i32, found floating-point number
|
= note: expected type `i32`
found type `{float}`
error[E0277]: the trait bound `{float}: Bar` is not satisfied
--> $DIR/type_inference.rs:25:5
|
LL | fn only_bar<T: Bar>(_x: T) { }
| -------------------------- required by `only_bar`
...
LL | only_bar(x);
| ^^^^^^^^ the trait `Bar` is not implemented for `{float}`
|
= help: the following implementations were found:
<i32 as Bar>
<u32 as Bar>
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.