-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
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.
najamelan and euclio
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.