-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-proc-macrosArea: Procedural macrosArea: Procedural macrosC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
struct AB {}
impl<'de> serde::Deserialize<'de> for AB {
fn deserialize<D>(_deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
#[derive(serde::Deserialize)] // comment this out to fix the stack overflow
struct A2 {}
return Ok(AB{})
}
}
fn main(){}
playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=8bfc3b0d3b728b256df33a4db645302c
Meta
rustc --version --verbose
:
rustc 1.50.0-beta.5 (ff5998292 2021-01-05)
binary: rustc
commit-hash: ff59982926d98c8508008f0559f8a055260ac05e
commit-date: 2021-01-05
host: x86_64-pc-windows-msvc
release: 1.50.0-beta.5
(but also present in stable and nightly)
Error output
thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow
error: could not compile `playground`
Metadata
Metadata
Assignees
Labels
A-proc-macrosArea: Procedural macrosArea: Procedural macrosC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.