Skip to content

test: drop unused use super::* in issue3255 interactive mod (Refs #3789) - #3794

Merged
caomengxuan666 merged 2 commits into
masterfrom
fix/3789-issue3255-unused-import
Nov 16, 2026
Merged

caomengxuan666 merged 2 commits into
masterfrom
fix/3789-issue3255-unused-import

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

根因

tests/issue3255_histexpand_prefix_invocation_name.rs:117(#[cfg(unix)] mod interactive 内)的 use super::*; 在该 mod 内无任何引用:父级 helper(parse_c_no_name/apply_with_bash_argv0)只在父级作用域被使用,mod 内只用全限定 std::/libc:: 路径与自身 items(scratch_home/interactive_session/FAILED_INPUT)。整树 RUSTFLAGS="-D warnings" cargo check --tests --keep-going 在此硬错(error: unused import: super::*),与 #3772/#3776 同类。

修法

删该行 import 一行(+0/−1),其余不动;钉语义不动。

本 PR 删除了什么

  • tests/issue3255_histexpand_prefix_invocation_name.rs 内 #[cfg(unix)] mod interactive 中的 use super::*; 一行(未使用的 glob import)。无产品代码、无测试用例、无公开 API 被删除或改动。

验证(UNVERIFIED-BY-CAPTAIN)

  • Linux 腿(box):RUSTFLAGS="-D warnings" cargo check --locked --tests + 该 stem 全绿,待补。
  • Windows 腿(X299):整树 compile check,待补。

Refs #3789

Root cause: `#[cfg(unix)] mod interactive` in
tests/issue3255_histexpand_prefix_invocation_name.rs imported `super::*`
but referenced no parent item — the parent helpers
parse_c_no_name/apply_with_bash_argv0 are used only in parent scope, and
the mod uses only fully-qualified std::/libc:: paths plus its own items.
Under RUSTFLAGS="-D warnings" the whole-tree `cargo check --tests`
hard-errors on the unused glob import. Fix is a one-line deletion
(+0/-1); nail semantics unchanged.

Refs #3789
@caomengxuan666
caomengxuan666 merged commit 5c94939 into master Nov 16, 2026
17 of 22 checks passed
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.

1 participant