Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

bug(ci): some warnings are not enforced by `features` step

オープン
#4,232 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@cratelyn がすでに取り組んでいます。

2026年10月13日 から。

評価

この issue はまだ評価されていません。

説明

A-tests C-bug

in https://github.com/hyperium/hyper/pull/4231, we noticed that the features step in the CI pipeline did not properly catch some warnings when running cargo hack against various feature combinations.

i tracked that down to a root cause of discrepancy between what warnings we enforce when running cargo test --features full, here:

Also since they can just be dropped immediately without triggering a warning, do {}_span! macros not have #[must_use]?

i was really curious about this as well. i think i figured this out:

first, i confirmed that Entered is marked with this attribute: https://docs.rs/tracing/0.1.44/src/tracing/span.rs.html#387

and i was also able to confirm that a warning appears when building the errant commit b236593b with a nightly toolchain, with the tracing feature active.

moreover, i even found that these did generate warnings in CI, here: https://github.com/hyperium/hyper/actions/runs/38023510701/job/114129390066#step:7:217

however, note the specific warnings we deny when running cargo hack, here:

      - name: check --feature-powerset with tracing feature
        run: cargo hack --no-dev-deps check --feature-powerset --depth 2 --features tracing --skip ffi
        env:
          RUSTFLAGS: "--cfg hyper_unstable_tracing -D dead_code -D unused_imports"

...as compared to the compiler warning:

  warning: unused `EnteredSpan` that must be used
    --> src/proto/h1/role.rs:86:5
     |
  86 |     trace_span!("parse_headers");
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: once a span has been entered, it should be exited
     = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default
  help: use `let _ = ...` to ignore the resulting value
     |
  86 |     let _ = trace_span!("parse_headers");;
     |     +++++++                             +

we are only denying dead\_code and unused\_imports, and this is a separate linting rule.

we don't enforce warnings as strictly when running cargo hack, because we only deny warnings in tests here:

// src/lib.rs
#![cfg_attr(all(test, feature = "full"), deny(unreachable_pub))]
#![cfg_attr(all(test, feature = "full"), deny(warnings))]
#![cfg_attr(all(test, feature = "nightly"), feature(test))]

https://github.com/cratelyn/hyper/blob/b236593b60195dd25b53fefbb6b3f47b422b2db9/src/lib.rs#L4-L6

i think we can fix this easily, but i wanted to write this up here to (a) explain in-band why we didn't see a CI failure previously, and (b) act as a comment i can spin out into a separate issue.

thank you again for your thoughtful review, @/dswij, i appreciate it very much.

we should bring these into alignment. it can be somewhat abrasive to develop code in a feature that always enforces warnings however, so it would be nice to keep this blanket enforcement of all warnings cordoned off to specific builds in CI, as opposed promoting that to an unpredicated #![deny(warnings)].

主要言語
Rust
スター
16.4k
フォーク
1.8k
平均マージ
2日 9時間
マージ済み PR(30日)
14

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hyperium/hyper のほかの issue

hyperium/hyper の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。