-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Incremental compilation ICE "forcing query with already existing DepNode
…" using ouroboros
#106136
Labels
A-incr-comp
Area: Incremental compilation
C-bug
Category: This is a bug.
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
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.
Comments
steffahn
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
Dec 25, 2022
rustbot
added
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
A-incr-comp
Area: Incremental compilation
labels
Dec 25, 2022
I tried to make a MCVE for this. I managed to remove the dependency but the code is not that minimal. template.rstype F<'a> = fn(&'a ());
macro_rules! output {
($t: ty) => {
struct S<'a> {
r: &'a VARIABLE,
o: Box<F<'a>>,
}
struct SAsyncSendTryBuilder<
'a,
RBuilder_: for<'this> ::core::ops::FnOnce(
&'this Box<F<'a>>,
) -> ::core::pin::Pin<
Box<
dyn ::core::future::Future<
Output = ::core::result::Result<&'this VARIABLE, Error_>,
> + ::core::marker::Send
+ 'this,
>,
>,
Error_,
> {
o: Box<F<'a>>,
r_builder: RBuilder_,
}
impl<
'a,
RBuilder_: for<'this> ::core::ops::FnOnce(
&'this Box<F<'a>>,
) -> ::core::pin::Pin<
Box<
dyn ::core::future::Future<
Output = ::core::result::Result<&'this VARIABLE, Error_>,
> + ::core::marker::Send
+ 'this,
>,
>,
Error_,
> SAsyncSendTryBuilder<'a, RBuilder_, Error_>
{
async fn try_build_or_recover(
self,
) -> ::core::result::Result<S<'a>, (Error_, Heads<'a>)> {
S::try_new_or_recover_async_send(self.o, self.r_builder).await
}
}
struct Heads<'a> {
o: Box<F<'a>>,
_consume_template_lifetime_a: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> S<'a> {
async fn try_new_or_recover_async_send<Error_>(
o: Box<F<'a>>,
r_builder: impl for<'this> ::core::ops::FnOnce(
&'this Box<F<'a>>,
) -> ::core::pin::Pin<
Box<
dyn ::core::future::Future<
Output = ::core::result::Result<&'this VARIABLE, Error_>,
> + ::core::marker::Send
+ 'this,
>,
>,
) -> ::core::result::Result<S<'a>, (Error_, Heads<'a>)> {
todo!()
}
}
};
}
output!(str);
fn main() {} build_fail.shcargo clean
rm src/main.rs
cp template.rs src/main.rs
sed -i 's/VARIABLE/$t/' src/main.rs
cargo build
rm src/main.rs
cp versions/template.rs src/main.rs
sed -i 's/VARIABLE/u8/' src/main.rs
cargo build This script produces the following ICE.
|
I made a failing test with a proc macro. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-incr-comp
Area: Incremental compilation
C-bug
Category: This is a bug.
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
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.
Reproduces on this change
try it out online here
Searching the error on open issues only shows this issue, but I’m not sure whether consts are involved here, too. Ouroboros does generate quite some code… someone (maybe me myself at a later date) would need to expand the macro and search for the relevant bit that causes the ICE. I.e. @rustbot label E-needs-mcve. With a reduced example, we can better judge if this could be a duplicate, and we could also more easily check whether this is a regression, and if yes, where/when.
@rustbot label A-incr-comp
The text was updated successfully, but these errors were encountered: