Closed
Description
#[macro_use]
extern crate serde_derive;
#[derive(Serialize)]
struct S;
fn main() {
i32::from(""); // error
}
Error with rustc 1.21.0-beta.3 (ea1fd7d 2017-09-15):
error[E0277]: the trait bound `i32: std::convert::From<&str>` is not satisfied
--> src/main.rs:8:5
|
8 | i32::from(""); // error
| ^^^^^^^^^ the trait `std::convert::From<&str>` is not implemented for `i32`
Error with rustc 1.22.0-nightly (417c738 2017-10-05):
error[E0277]: the trait bound `i32: _IMPL_SERIALIZE_FOR_S::_serde::export::From<&str>` is not satisfied
--> src/main.rs:8:5
|
8 | i32::from(""); // error
| ^^^^^^^^^ the trait `_IMPL_SERIALIZE_FOR_S::_serde::export::From<&str>` is not implemented for `i32`
I would expect the error message to show std::convert::From
, not Serde's re-export at least in code that has nothing to do with Serde.