3 ms·
I know there is definitely some wonkyness with rust traits and type inference, // Uncomment for compiler error. // use serde_json as _; // // B
by ratmice 2y ago
I know there is definitely some wonkyness with rust traits and type inference,
// Uncomment for compiler error.
// use serde_json as _;
//
// Because serde_json includes impl PartialEq<serde_json::value> for u32
let _ = 1u32 == 1usize.try_into().unwrap();
One really interesting thing is that this can affect a comparison in a totally separate crate that never uses serde_json via features.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=aea52ee50e8e479198686e3b7b63c6cd https://play.rust-lang.org/?version=stable&mode=debug&editio...