Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/analyze/crate_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ impl<'tcx, 'ctx> Analyzer<'tcx, 'ctx> {
let mut keys = self.tcx.mir_keys(()).clone();
let mut trait_method_spec_keys = HashSet::new();
for local_def_id in self.tcx.mir_keys(()) {
if !self.tcx.def_kind(*local_def_id).is_fn_like() {
keys.swap_remove(local_def_id);
continue;
}
Comment on lines +68 to +71

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving this PR test-free intentionally — the author asked for the fix without new test cases. Worth noting for anyone adding one later: the natural pair here doesn't fit the pass/fail shape well, since the bug is an ICE rather than a soundness gap, so a fail counterpart would have to break the assertion rather than the guard being fixed.

The reproductions from #198 were verified by hand against this branch (results in the PR description).


Generated by Claude Code

let analyzer = self.ctx.local_def_analyzer(*local_def_id);
if analyzer.is_annotated_as_extern_spec_fn() {
let target_def_id = analyzer.extern_spec_fn_target_def_id();
Expand Down Expand Up @@ -93,9 +97,6 @@ impl<'tcx, 'ctx> Analyzer<'tcx, 'ctx> {
self.skip_analysis.insert(*local_def_id);
keys.swap_remove(local_def_id);
}
if !self.tcx.def_kind(*local_def_id).is_fn_like() {
keys.swap_remove(local_def_id);
}
}
for local_def_id in &trait_method_spec_keys {
self.refine_fn_def(*local_def_id);
Expand Down