-
-
Notifications
You must be signed in to change notification settings - Fork 843
Closed
Description
With the release of 1.122, IntoDeserializer
seems to have type inference problems with strings. For example:
use serde::de::IntoDeserializer;
fn f<'a, T: IntoDeserializer<'a>>(t: T) {
t.into_deserializer();
}
fn main() {
let s = String::new();
f(s.as_ref()); // ERROR: type annotation needed
}
The real-world example is in Cargo as illustrated here: rust-lang/cargo#9101
This seems to be caused by #1898. cc @Mingun
I'm fine if this is closed as WontFix (I can easily add a type annotation), I just wanted to check if this was intended or ok.
EDIT: Updated code to avoid issue in rust-lang/cargo#9102
Uriopass, danielzgtg, samanpa and Others
Metadata
Metadata
Assignees
Labels
No labels