-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic (&A -> T) -> (&'a A -> Box<dyn Any + 'a>)
crashes
#125891
Labels
A-borrow-checker
Area: The borrow checker
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
ItzShiney
added
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Jun 2, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Jun 2, 2024
ItzShiney
changed the title
Generic
Generic Jun 2, 2024
(&A -> T)
-> (&'a A -> Box<dyn Any + 'a>)
crashes(&A -> T) -> (&'a A -> Box<dyn Any + 'a>)
crashes
saethlin
removed
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Jun 2, 2024
probably duplicate of #122704 |
proly related to #122704 |
I tried to minimize this, and I can't go smaller than this: trait IsStatic: 'static {}
impl<T: 'static> IsStatic for T {}
fn foo<T>(x: Box<T>) -> impl for<'a> FnOnce(&'a ()) -> Box<dyn IsStatic + 'a> {
move |_| x
} Error output
Note that the code is invalid, since it should have a Seems identical to the aforementioned #122704 except for having |
jieyouxu
added
A-borrow-checker
Area: The borrow checker
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
labels
Nov 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-borrow-checker
Area: The borrow checker
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I'm not sure if this is a minimal example, but I couldn't shrink it any more.
Generic
T
is necessary,A
can be any type.Code
Meta
The bug exists in both the latest stable and the latest nightly.
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: