Skip to content

ICE: Should not be resolving bound region. #114478

Closed as not planned
Closed as not planned
@matthiaskrgr

Description

@matthiaskrgr

Code

#![feature(type_alias_impl_trait)]
#![allow(incomplete_features)]

type Fut<'a> = impl Iterator<Item = Result<Signature, ()>>;

trait Trait<'x> {
    type Thing;
}

impl Foo<'_> {
    fn make_fut(&self) -> Box<dyn for<'a> Trait<'a, Thing = Fut<'a>>> {
        todo!();
    }
}

fn main() {}

Meta

rustc --version --verbose:

ec5b882c2f02441b13123c1694c5704933ebdbb5

Error output

error[E0412]: cannot find type `Signature` in this scope
 --> 05633931A4C2A5DDC8E1EB82579141E8B707D46DDB9C502A8AD15B2F6FA9FFB8.rs:4:44
  |
4 | type Fut<'a> = impl Iterator<Item = Result<Signature, ()>>;
  |                                            ^^^^^^^^^ not found in this scope
  |
help: you might be missing a type parameter
  |
4 | type Fut<'a, Signature> = impl Iterator<Item = Result<Signature, ()>>;
  |            +++++++++++

error[E0412]: cannot find type `Foo` in this scope
  --> 05633931A4C2A5DDC8E1EB82579141E8B707D46DDB9C502A8AD15B2F6FA9FFB8.rs:10:6
   |
10 | impl Foo<'_> {
   |      ^^^ not found in this scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-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 wayrequires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions