Summary
cssl-mir/src/monomorph.rs:1195 panics with a generic message:
.expect("impl block not found");
When this fires during development, there's no indication of which type or function was being monomorphized, making it hard to debug.
What to do
Replace the bare expect() with one that includes the relevant type information:
.unwrap_or_else(|| panic!(
"impl block not found for type {:?} during monomorphization of {:?}",
concrete_ty, fn_name // use whatever variables are in scope
))
You'll need to read the surrounding code to find the right variable names.
Why this is a good first issue
- Single-line change with real diagnostic value
- Requires reading a small section of
monomorph.rs to understand the context
- Teaches how monomorphization works in the MIR pass
- No extern dependencies or unsafe code involved
Files
compiler-rs/crates/cssl-mir/src/monomorph.rs (line 1195)
Summary
cssl-mir/src/monomorph.rs:1195panics with a generic message:When this fires during development, there's no indication of which type or function was being monomorphized, making it hard to debug.
What to do
Replace the bare
expect()with one that includes the relevant type information:You'll need to read the surrounding code to find the right variable names.
Why this is a good first issue
monomorph.rsto understand the contextFiles
compiler-rs/crates/cssl-mir/src/monomorph.rs(line 1195)