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
async fn ICEs in macro on stable #67778
Comments
Reproduced with lastest nighlty:
ICE from macro resolving I believe. rust/src/librustc/hir/map/definitions.rs Lines 511 to 513 in e380efa
cc @petrochenkov |
This comment has been minimized.
This comment has been minimized.
triage: P-high, removing nomination tag. (instead, going to proritize going through the P-high issues that have accumulated over last two weeks.) |
Visiting from triage.. the next step is to reduce the reproducer. |
Reduced (playground): macro_rules! doc_comment {
($x: expr, $($tt: tt)*) => {
#[doc = $x]
$($tt)*
};
}
macro_rules! paged_routes {
($($rest: tt)* ) => {
doc_comment! {
concat!("", ""),
async fn name() {}
}
paged_routes! {
$($rest)*
}
};
() => {}
}
impl Mastodon {
paged_routes! {
}
}
|
Further reduced: macro_rules! with_doc {
($doc: expr) => {
#[doc = $doc]
async fn f() {}
};
}
with_doc!(concat!("")); |
Fixed in #70011. |
I was migrating my library (Mammut) to use reqwest
0.10
and be async, and the compiler ICEd. I don't know how to reduce it further than this.I tried this code:
XAMPPRocky/Mammut@f30bdec#diff-b4aea3e418ccdb71239b96952d9cddb6
I expected to see this happen: A successful build or another compile error
Instead, this happened:
thread 'rustc' panicked at 'no entry found for key', src/libcore/option.rs:1188:5
Meta
I also tried this on the latest nightly and it emits the same error.
rustc --version --verbose
:Backtrace:
The text was updated successfully, but these errors were encountered: