You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was working through a couple Serde issues with @dtolnay when I hit a bad error:
error[E0275]: overflow evaluating the requirement `<&mut serde_json::Serializer<&mut std::vec::Vec<u8>> as serde::Serializer>::Error`
|
= help: consider adding a `#![recursion_limit="128"]` attribute to your crate
Raising the recursion limit causes the compiler to ask me to raise the recursion limit again and again, out forever.
@dtolnay recommended I file an issue here after minimizing the error case:
<dtolnay> wow that's crazy
<dtolnay> this part looks like a compiler bug -- that associated type should be easy to figure out
<dtolnay> lpg: see how much you can minimize this "overflow evaluating the requirement" error and file an issue in github.com/rust-lang/rust
The text was updated successfully, but these errors were encountered:
After taking a closer look, I think this is a case of the compiler catching something that legitimately doesn't make sense (albeit with not a great error message). In this Expression type how would you expect Baz(Box::new(Baz(Box::new(Foo)))) to be represented in JSON?
If your expression is a Baz then the "type" tag needs to be inside the nested expression, but if that one is also a Baz then both your tag and its tag need to be inside the next nested expression, but if that one is a Baz as well then etc, overflow.
I filed #50043 to detect this particular type of overflow and handle it with a better error message.
I was working through a couple Serde issues with @dtolnay when I hit a bad error:
Minimal playground example:
https://play.rust-lang.org/?gist=c19a458d3246d211beb1ae7d88c0ddee&version=stable
Raising the recursion limit causes the compiler to ask me to raise the recursion limit again and again, out forever.
@dtolnay recommended I file an issue here after minimizing the error case:
The text was updated successfully, but these errors were encountered: