#162774·Rust

[ICE]: `无法解析委托到内建实现`

作者: matthiaskrgr创建于 2026年9月14日更新于 2026年9月17日
标签I-ICET-compilerC-bugneeds-triageF-fn_delegation

auto-reduced (treereduce-Rust):

#![feature(fn_delegation)]

trait Trait {
    fn foo<'a: 'a>(&self) {}
}

struct F;
impl Trait for F {}

struct S(F);
impl S {
    reuse Trait::foo::<> { self.0 }

    reuse Self::foo::<'_> as bar { self.0 }
}

fn main() {}

original:

//@ check-pass
//@ compile-flags: -Z deduplicate-diagnostics=yes
#![feature(fn_delegation)]

trait Trait {
    fn foo<'a: 'a>(&self) {}
}

struct F;
impl Trait for F {}

struct S(F);
impl S {
    reuse Trait::foo::<> { self.0 }

    reuse Self::foo::<'_> as bar { self.0 }
}

fn main() {}

Version information

rustc 1.100.0-nightly (a8a1e6fd9 2026-09-14)
binary: rustc
commit-hash: a8a1e6fd9df2e094d6f09c0d57991508680acc1c
commit-date: 2026-09-14
host: x86_64-unknown-linux-gnu
release: 1.100.0-nightly
LLVM version: 23.1.1
```