Description
I'm getting a really weird error after upgrading from 0.26.0 to 0.27.1. I've tried to put together a reproduce case, but I'm having difficulty doing so, but I'll give as many details as I can.
The error I get is as follows:
error[E0275]: overflow evaluating the requirement `&mut std::string::String: std::fmt::Write`
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`lib`)
= note: required for `&mut &mut std::string::String` to implement `std::fmt::Write`
= note: 127 redundant requirements hidden
= note: required for `&mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut std::string::String` to implement `std::fmt::Write`
= note: required for `se::element::ElementSerializer<'_, &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut std::string::String>` to implement `serde::Serializer`
For more information about this error, try `rustc --explain E0275`.
error: could not compile `project` due to previous error
I make use of AsRef<T>
and Cow<'_, str>
in several cases, but I'm not sure that it is the core of the issue since I'm not able to make a reproduce case. I don't understand where the recursion of &mut
is coming from. Nothing in my code is explicitly recursive as far as I am aware, and cargo expand
does not highlight anything that stands out.
Does the above provide any clues that might point me in the direction of where to look in my code? I will try to again to reproduce, but the repository having the issue is a private one.