-
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
Fix ICE when querying DefId on Def::Err. #37564
Conversation
Test? |
Yeah, I need to add that. Where should it go? |
compile-fail |
if let Ok(kind_id) = kind_id { | ||
let trait_def = tcx.expect_def(tpb.ref_id); | ||
if trait_def != Def::Trait(kind_id) { | ||
if trait_def.def_id() != kind_id { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed, the line above it replaces it.
@Mark-Simulacrum |
df1c601
to
3d3e63f
Compare
Okay, fixed nits, but I don't know how to fix tidy warning on the long line in compile-fail. |
3d3e63f
to
d5f72d2
Compare
Oh, okay, turns out you can just truncate the error message. Let me know if that's the expected approach. Otherwise I think this is done. r? @eddyb |
@bors r+ |
📌 Commit d5f72d2 has been approved by |
Fix ICE when querying DefId on Def::Err. Also moves computations into check that `kind_id` is `Ok(_)`, which is in theory an optimization, though I expect it's minor. Fixes rust-lang#37534. r? @eddyb.
Fix ICE when querying DefId on Def::Err. Also moves computations into check that `kind_id` is `Ok(_)`, which is in theory an optimization, though I expect it's minor. Fixes rust-lang#37534. r? @eddyb.
Fix ICE when querying DefId on Def::Err. Also moves computations into check that `kind_id` is `Ok(_)`, which is in theory an optimization, though I expect it's minor. Fixes rust-lang#37534. r? @eddyb.
Fix ICE when querying DefId on Def::Err. Also moves computations into check that `kind_id` is `Ok(_)`, which is in theory an optimization, though I expect it's minor. Fixes rust-lang#37534. r? @eddyb.
Also moves computations into check that
kind_id
isOk(_)
, which is in theory an optimization, though I expect it's minor.Fixes #37534.
r? @eddyb.