This code compiles and runs file:
// use rusoto_s3;
fn f() -> bool {
let x: u16 = 1234;
let y: u8 = 1;
x / 100 != y.into()
}
fn main() {
println!("{}", f())
}
But when I uncomment use rusoto_s3
, I get the following error message:
error[E0283]: type annotations needed for `u16`
--> src/main.rs:6:13
|
4 | let x: u16 = 1234;
| - consider giving `x` a type
5 | let y: u8 = 1;
6 | x / 100 != y.into()
| ^^ cannot infer type for type `u16`
|
= note: cannot satisfy `u16: PartialEq<_>`
What could be causing this?
Cargo.toml is as follows:
[package]
name = "test_rust"
version = "0.1.0"
authors = ["Brennan Vincent <brennan@umanwizard.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rusoto_s3 = "0.45.0"