-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Compiler out of stack on generic base trait impl restricted to a derived trait #5988
Copy link
Copy link
Closed
Labels
A-trait-systemArea: Trait systemArea: Trait systemE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.P-lowLow priorityLow priority
Metadata
Metadata
Assignees
Labels
A-trait-systemArea: Trait systemArea: Trait systemE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.P-lowLow priorityLow priority
Type
Fields
Give feedbackNo fields configured for issues without a type.
Rustc runs out of stack on this program:
The inheritance of trait T from B seemingly triggers the recursion: without it, the program compiles and runs fine.
P.S. The commented-out lines illustrate what I was actually trying to achieve: upcasting a trait pointer to the base trait. That didn't work for other reasons.