Skip to content

fix: Crash on code actions when an unresolved module is present#22749

Merged
ChayimFriedman2 merged 1 commit into
rust-lang:masterfrom
Wilfred:fix-generate-function-unresolved-module
Jul 9, 2026
Merged

fix: Crash on code actions when an unresolved module is present#22749
ChayimFriedman2 merged 1 commit into
rust-lang:masterfrom
Wilfred:fix-generate-function-unresolved-module

Conversation

@Wilfred

@Wilfred Wilfred commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Previously rust-analyzer assumed that a module always had an item list, which isn't true for unresolved modules. This would produce a panic:

module definition source should have an item list

Handle this situation gracefully instead of panicking, and add a test.

AI disclosure: Written with help by GPT-5.5.

Previously rust-analyzer assumed that a module always had an item
list, which isn't true for unresolved modules.

Handle this situation gracefully instead of panicking, and add a test.

AI disclosure: Written with help by GPT-5.5.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 9, 2026
@ChayimFriedman2 ChayimFriedman2 added this pull request to the merge queue Jul 9, 2026
Merged via the queue into rust-lang:master with commit a1949dc Jul 9, 2026
18 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 9, 2026
@Wilfred Wilfred deleted the fix-generate-function-unresolved-module branch July 9, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants