should tuple variants allow a rest field?

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
36/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
backend

調査の方向性

Start by reading VariantDetails and the variant default walk that calls default_impl_tuple_items directly, then inspect the macro handling of #[flatten] on variant tuple fields. The issue frames this as an open design question and does not name files or tests; determine whether tuple variants should support a rest field and what behavior would define completion.

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

説明

VariantDetails::Tuple is a bare Vec<Id>, so a tuple variant can't have a flattened remainder, while a TupleStruct can. Both serialize as JSON arrays, so a schema with additionalItems could map onto either; today it can only map onto the struct form.

Adding it touches VariantDetails, the variant default walk (which calls default_impl_tuple_items directly), and the macro, whose #[flatten] is refused on variant tuple fields precisely because there's no rest to flatten into. Not sure it's worth it yet; filing so the question has a home.

主要言語
Rust
スター
4
フォーク
4
平均マージ
15時間 16分
マージ済み PR(30日)
26

環境構築

はじめの一歩

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

oxidecomputer/typespace のほかの issue

oxidecomputer/typespace の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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