Skip to content

ICE: Not enough bound vars: BoundRegion { var: 0, kind: BrNamed(DefId(0:17 ~ mvce[4307]::Trait::description::'_), '_) } not found in [] #122550

Closed
@matthiaskrgr

Description

@matthiaskrgr

auto-reduced (treereduce-rust):

trait Trait {
    fn description(&self) -> &str {}
}

struct F;

mod to_reuse {
    pub fn foo(&self ) -> i32 { x + 1 }
}

struct S(F);
impl Trait for S {
    reuse Trait::bar { &self.0 }
    reuse <F as Trait>
    reuse Trait::baz { &self.0 }
}

impl S {
    reuse Trait::baz { &self.0 }
    reuse <S as Trait>::description { to_reuse::foo(self) }
}

original (from tests/ui/delegation/explicit-paths-pass.rs )

#![feature(fn_delegation)]
trait Trait {
    fn description(&self) -> &str {}
}

struct F;

mod to_reuse {
    pub fn foo(&self ) -> i32 { x + 1 }
}

struct S(F);
impl Trait for S {
    reuse Trait::bar { &self.0 }
    reuse <F as Trait>
    reuse Trait::baz { &self.0 }
}

impl S {
    reuse Trait::baz { &self.0 }
    reuse <S as Trait>::description { to_reuse::foo(self) }
}

Version information

rustc 1.78.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.78.0-dev
LLVM version: 18.1.0

Command:
/home/matthias/.rustup/toolchains/local-debug-assertions/bin/rustc -Zincremental-verify-ich=yes -Cincremental=<dir> -Cdebuginfo=2

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-fn_delegation`#![feature(fn_delegation)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some way

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions