2 ms·
That code doesn't compile. :) If you're ever curious about something like this, feel free to use the online playground, like so: https://play.rust-lang.org/?gis
by kibwen 9y ago
That code doesn't compile. :) If you're ever curious about something like this, feel free to use the online playground, like so: https://play.rust-lang.org/?gist=c3c93fb796d5fa79f829baa3dece0489&version=stable https://play.rust-lang.org/?gist=c3c93fb796d5fa79f829baa3dec...
Here's the compiler error that you'd get:
error[E0308]: mismatched types
--> src/main.rs:7:13
|
7 | foo32(x);
| ^ expected f32, found f64
error[E0308]: mismatched types
--> src/main.rs:13:13
|
13 | foo64(x);
| ^ expected f64, found f32