Skip to content

[test-hygiene] issue523 钉文件在 cfg(windows) 下 use std::io::Write 未使用,整树 -D warnings 检查在 Windows 上硬错(#3772 同类) #3776

Closed

Description

@caomengxuan666

缺陷

tests/issue523_compgen_quoted_tilde_regressions.rs(104 行,文件头 #![cfg(windows)])第 24 行:

use std::io::Write;

全文件仅此一处出现 Write,从未使用。Windows 下整树 cargo check --tests 在 RUSTFLAGS="-D warnings" 下硬错:

error: unused import: std::io::Write

证据

修复方向

删掉第 24 行 import(与 #3772 的修法同类:#3775 只改 tests/issue1794_user_group_completion.rs +3/−0)。钉本身 4 个测试皆 #[cfg(unix)]?不——本文件是 #![cfg(windows)],测试只在 Windows 跑;删 import 后须在 Windows 上重跑整树 check + 该茎测试。

归宿

与 #3772 同波修掉(#3775 已合入后或同批),修法 PR Refs 本单。

Refs #3772.

Activity

  1. added this to the 1.5.1 milestone on Nov 16, 2026
  2. added
    bug
    P3-low
    area:builtins
    on Nov 16, 2026
  3. caomengxuan666 commented on Nov 16, 2026

    @caomengxuan666
    MemberAuthor

    订正正文一处表述:本文件 4 个测试皆由文件头的 #![cfg(windows)] 门控,只在 Windows 跑(正文里“4 个测试皆 #[cfg(unix)]?”一句是笔误,应删)。其余事实不变:use std::io::Write;(第 24 行)全文件唯一出现、从未使用。

  4. caomengxuan666 commented on Nov 16, 2026

    @caomengxuan666
    MemberAuthor

    队长车道开工(Uarz 休息期间临时接手——本单 assignee 为队长本人,按派工单执行):复现 + 删 tests/issue523_compgen_quoted_tilde_regressions.rs 第 24 行未使用的 use std::io::Write;,验证走 X299 Windows 腿。工作区 ~/workspace/fix-3776/,分支 fix/3776-issue523-unused-write-import,基底 d3f1cce。

  5. caomengxuan666 commented on Nov 16, 2026

    @caomengxuan666
    MemberAuthor

    修法已合入:PR #3778(squash merge 154a95a)删了 tests/issue523_compgen_quoted_tilde_regressions.rs 第 24 行未用的 use std::io::Write;。#3778 正文为 Refs-only,故手关本单。队长复核 PASS 6916847892:X299 腿基底 fail-first exit 101 → 修后 exit 0、该茎 4/4;CI Windows compile check pass,其余红腿皆为 issue2875 基线格/census 基线红。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P3-lowarea:builtinsbug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions