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
ICE: hit debug-assertions assertion left == right
failed in compiler/rustc_middle/src/hir/map/mod.rs
#124125
Comments
Backtrace part 1
|
Backtrace part 2
|
Backtrace part 3
|
MCVE: This generates a I think this cannot be reproduced with only macro crate[package]
name = "mac"
version = "0.1.0"
edition = "2021"
[lib]
proc-macro = true use proc_macro::TokenStream;
use std::str::FromStr;
#[proc_macro]
pub fn mac(mut stream: TokenStream) -> TokenStream {
stream.extend(TokenStream::from_str("{}").unwrap());
// ^^ this {} token's syntax context is inside the macro ...
stream
} main crate[package]
name = "issue-124125"
version = "0.1.0"
edition = "2021"
[dependencies]
mac = { path = "mac" } fn main() {
_ = mac::mac!(||);
// ^^^^^^^^^^^^^ ... but the {} token's span points to the macro call site here.
} @rustbot label -E-needs-mcve S-has-mcve A-proc-macros requires-debug-assertions -needs-triage |
assertion
left == right failed
in compiler/rustc_middle/src/hir/map/mod.rsleft == right
failed in compiler/rustc_middle/src/hir/map/mod.rs
Code
https://github.com/SeaDve/Kooha/
tag: v2.2.3
Meta
rustc --version --verbose
:It's a rustc build with debug-assertions enabled. I build it from beta(2024-04-13) tar ball using gentoo ebuild.
Error output
Backtrace is too long...
The text was updated successfully, but these errors were encountered: