import_trait_associated_functions: query cycle / `internal compiler error: query cycle when printing cycle detected`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by building the minimized reproduction from the issue body and confirming the cycle with RUSTC_LOG or -Z query-dep-graph-style tracing; the query stack names the loop: getting owner for Test::Type -> lowering HIR -> resolving type relative delegations -> AST lowering -> lints. Read the rustc-dev-guide chapters on queries and the rustc_resolve type-relative path resolution, then find where pub use Test::Type (under #![feature(import_trait_associated_functions)]) triggers resolution before the owner/HIR is available. Done means the snippet either compiles or errors cleanly, with a regression test under tests/ui/.
索引モデルが issue の本文から書いたものです。
説明
original:
#![feature(import_trait_associated_functions)]
trait Test {
type Type;
}
pub use Test::Type;
fn main() {}
Version information
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
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
`--edition` is unspecified, defaulting to `2015` while the latest is `2024`; it must be one of: <2015|2018|2021|2024|future>
error: internal compiler error: query cycle when printing cycle detected
|
= note: ...when getting owner for `Test::Type`
= note: ...which requires lowering HIR for `Test::Type`...
= note: ...which requires resolving type relative delegations...
= note: ...which requires getting the AST for lowering...
= note: ...which requires perform lints prior to AST lowering...
= note: ...which requires looking up span for `Test::Type`...
= note: ...which again requires getting owner for `Test::Type`, completing the cycle
= note: cycle used when computing associated item data for `Test::Type`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
error[E0391]: cycle detected when getting the resolver for lowering
|
= note: ...which requires computing associated item data for `Test::Type`...
= note: ...which requires getting owner for `Test::Type`...
= note: ...which requires lowering HIR for `Test::Type`...
= note: ...which requires resolving type relative delegations...
= note: ...which requires getting the AST for lowering...
= note: ...which requires perform lints prior to AST lowering...
= note: ...which again requires getting the resolver for lowering, completing the cycle
= note: for more information, see <https://rustc-dev-guide.rust-lang.org/overview.html#queries> and <https://rustc-dev-guide.rust-lang.org/query.html>
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0391`.
@rustbot label +F-import_trait_associated_functions
- 主要言語
- 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
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
antithesishq/bombadil#473 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
libracoder/kiri#669 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 5 日以内に返信
-
autofixer: follow-up
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
tursodatabase/turso#12217 ·
メンテナーはふだん 1 日以内に返信
-
Declare the CMS schema library in the optional recipients extra対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea:python in-progress
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
yhay81/pyropdf#1005 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信