-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-coerce_unsizedThe `CoerceUnsized` traitThe `CoerceUnsized` traitI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-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.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Description
I was experimenting with CoerceUnsized
and I encountered an ICE with this example:
#[derive(Clone)]
struct Redirectable<'a, T: ?Sized> {
data: Rc<Cell<&'a T>>
}
impl<U, T: CoerceUnsized<U>> CoerceUnsized<Redirectable<'_, U>> for Redirectable<'_, T> {}
This is hopefully an illegal CoerceUnsized
impl, as it would permit us to do illegal mutation (see the full playground link above for the context). Possible duplicate of #44861.
Note that the ICE requires a feature gate.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-coerce_unsizedThe `CoerceUnsized` traitThe `CoerceUnsized` traitI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-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.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.