-
-
Notifications
You must be signed in to change notification settings - Fork 796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serde causes 'rustc' stack overflow with in function struct definition #1953
Comments
Also, this may be a regression. Because the same code was able to be compiled one year ago. |
Using use serde::{ser::Serializer, Serialize};
pub struct Container;
impl Serialize for Container {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
const _: () = {
extern crate serde as _serde;
};
todo!()
}
}
|
This is a rustc bug. rust-lang/rust#55779 |
Thanks for the info. Should I close this issue? Or leave it until it is fixed by rustc? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example to reproduce the bug.
I am on macOS. This bug can be reproduced with both the stable (1.49.0 (e1884a8e3 2020-12-29)) and latest nightly (1.51.0-nightly (4253153db 2021-01-17)) rustc.
If we move
Foo
struct to the outside of theserialize
function, it can compile successfully.The text was updated successfully, but these errors were encountered: