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

ml-kem/module-lattice: `integer_extend_truncate` warnings

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

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

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
静か
技術スタック
rust
領域
cryptography

調査の方向性

ml-kem/src/algebra.rs の 123 行目付近から始めて、Truncate trait とその使用箇所を調べ、次に ml-kem/src/lib.rs の crate 属性を確認してください。標準ライブラリと衝突する可能性のある名前に頼らずに警告を解消してください。警告がなくなり、選択した API が明確なままであれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Just started getting these warnings:

warning: an associated function with this name may be added to the standard library in the future
   --> ml-kem/src/algebra.rs:123:27
    |
123 |         let N = start_n + u8::truncate(i);
    |                           ^^^^^^^^^^^^
    |
    = help: call with fully qualified syntax `truncate(...)` to keep using the current method
    = warning: once this associated item is added to the standard library, the ambiguity may cause an error or change in behavior!
    = note: for more information, see issue #48919 <https://github.com/rust-lang/rust/issues/48919>
    = note: `#[warn(unstable_name_collisions)]` (part of `#[warn(future_incompatible)]`) on by default
help: add `#![feature(integer_extend_truncate)]` to the crate attributes to enable `core::num::<impl u8>::truncate`
   --> ml-kem/src/lib.rs:45:1
    |
 45 + #![feature(integer_extend_truncate)]

It seems we should at least switch to using Truncate::truncate as the invocation syntax, but also this seems like a case where we should perhaps consider a different API entirely, or at least a different method name, so as not to clash with the standard library.

主要言語
Rust
スター
118
フォーク
58
平均マージ
29分
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

RustCrypto/KEMs のほかの issue

RustCrypto/KEMs の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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