-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
ICE with unsized associated type #60431
Copy link
Copy link
Closed
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)A-codegenArea: Code generationArea: Code generationA-type-systemArea: Type systemArea: Type systemC-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-highHigh priorityHigh 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.
Metadata
Metadata
Assignees
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)A-codegenArea: Code generationArea: Code generationA-type-systemArea: Type systemArea: Type systemC-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-highHigh priorityHigh 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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
produces:
Some context as to what that's actually for: the idea was to use the len metadata of the slice within the
DynRefto smuggle a pointer to the arena in question. At first glance you'd think you could also do:But the problem is that is mutable borrows: if
RefimplementsDerefMutthere's no way to both access the value and the arena at the same time. You need them separate, and deliberately public:allowing implementations like:
...and as for why the object can't just own a reference to the arena it's in, tl;dr: memmap;