Skip to content

fix: avoid panic in merge imports on trailing path separator#22736

Open
edragain2nd wants to merge 1 commit into
rust-lang:masterfrom
edragain2nd:fix_merge_import
Open

fix: avoid panic in merge imports on trailing path separator#22736
edragain2nd wants to merge 1 commit into
rust-lang:masterfrom
edragain2nd:fix_merge_import

Conversation

@edragain2nd

@edragain2nd edragain2nd commented Jul 7, 2026

Copy link
Copy Markdown

fix #22724
from the log, i make the minimal panic reproducer:

use foo::bar;
use foo::;

this is because merge_imports::split_prefix thinks the remaining suffix still contain at least one segment.
it ignore some bad cases like foo::; .

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

2 participants