next-solver proves higher-ranked supertrait bound with GAT that the old solver hits cycle on
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reading the Func and HigherFunc definitions and the blanket impl in the issue’s reproducer; compare how the old and next trait solvers handle the higher-ranked GAT supertrait bound. The old solver reports an overflow while the next solver compiles, and the issue asks whether that difference is expected. Done means determining the intended behavior and addressing the solver mismatch.
索引モデルが issue の本文から書いたものです。
説明
Randomly hit this while working on some higher-ranked lifetime branding stuff.
pub trait Func<'a> {
type Ret;
}
pub trait Inst {}
pub trait HigherFunc: for<'a> Func<'a, Ret = Self::RetInst<'a>> {
type RetInst<'a>: Inst;
}
impl<T> HigherFunc for T
where
T: for<'a> Func<'a, Ret: Inst>,
{
type RetInst<'a> = <T as Func<'a>>::Ret;
}
next-solver: Compiles successfully
old solver:
error[E0275]: overflow evaluating the requirement `Self: HigherFunc`
--> src/main.rs:6:1
|
6 | pub trait HigherFunc: for<'a> Func<'a, Ret = Self::RetInst<'a>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`playground`)
note: required for `Self` to implement `HigherFunc`
--> src/main.rs:9:9
|
9 | impl<T> HigherFunc for T
| ^^^^^^^^^^ ^
10 | where
11 | T: for<'a> Func<'a, Ret: Inst>,
| ---- unsatisfied trait bound introduced here
= note: 63 redundant requirements hidden
= note: required for `Self` to implement `HigherFunc`
I think the old solver is getting stuck checking the supertrait bound for the impl.
I'm not sure if next-solver is supposed to allow this code, since I believe there is a sensible proof here, and this does work for non-higher-ranked variants on both solvers, but it is a mismatch in behavior nonetheless.
Meta
rustc --version --verbose:
rustc 1.100.0 (0ef1bc386 2026-11-09)
binary: rustc
commit-hash: 0ef1bc386059596dada8fb65b50425aab2ea637a
commit-date: 2026-11-09
host: x86_64-unknown-linux-gnu
release: 1.100.0
LLVM version: 23.1.5
and
rustc 1.102.0-nightly (5f4effd57 2026-11-13)
binary: rustc
commit-hash: 5f4effd579500175af844241eb179e756190f1e7
commit-date: 2026-11-13
host: x86_64-unknown-linux-gnu
release: 1.102.0-nightly
LLVM version: 23.1.5
same behavior for old-solver on stable and on nightly with next-solver=coherence
- 主要言語
- Rust
- スター
- 122k
- フォーク
- 16.7k
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 515
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rust-lang/rust のほかの issue
-
Remove unnecessary parentheses when suggesting to remove '&' from a pattern対応中かも @BartSimpson001 が 1 日前に担当しました。 オープンA-diagnostics D-invalid-suggestion T-compiler
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Windows `File::set_permissions` silently does nothing when clearing `readonly` leaves `FileAttributes == 0`対応中かも @ChrisDenton が 11 日前に担当しました。 オープンA-filesystem C-bug O-windows T-libs
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
A-run-make relnotes relnotes-needs-review relnotes-tracking-issue T-lang T-libs
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
A-LLVM O-Arm O-UEFI O-x86_64 relnotes relnotes-needs-review relnotes-tracking-issue T-compiler
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
rust-lang/rust#165504 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
relnotes relnotes-tracking-issue T-libs
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
bytecodealliance/wrpc#1785 ·
メンテナーはふだん 1 日以内に返信
-
2 advisory ignore entries no longer match anything (`quick-xml` already patched in `Cargo.lock`)オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
longbridge/nsh#2758 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
antithesishq/bombadil#473 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
libracoder/kiri#669 ·
メンテナーはふだん 1 日以内に返信