Compiler ICEs in a diagnositc "expected a type, found a trait" when Clone and Copy is derived. #138264
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
This is a reduced example.
The nightly compiler panics when attempting to generate a diagnostic for this code:
The ICE occurs if a trait is used in place of the type of the field, and the struct containing the incorrect field definition is marked with
#[derive(Copy,Clone)]
. This ICE does not occur instable
orbeta
.Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: