Skip to content

ice Not enough bound vars: BoundRegion  #115474

Closed
@matthiaskrgr

Description

@matthiaskrgr

Code

pub trait Trait {}

pub type Foo = impl for<'a> Trait<'a, Assoc = impl Copy + 'a>;

Meta

rustc --version --verbose:

361f8ba847af0288b1beb3b84f6b7b4d3850bb43

Error output

error[E0658]: `impl Trait` in type aliases is unstable
 --> D4EEC737DBC306A9873DFECBC855175357C17FC8247010DD5EE8279A9AEE7023.rs:3:16
  |
3 | pub type Foo = impl for<'a> Trait<'a, Assoc = impl Copy + 'a>;
  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
  = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable

error[E0658]: `impl Trait` in type aliases is unstable
 --> D4EEC737DBC306A9873DFECBC855175357C17FC8247010DD5EE8279A9AEE7023.rs:3:47
  |
3 | pub type Foo = impl for<'a> Trait<'a, Assoc = impl Copy + 'a>;
  |                                               ^^^^^^^^^^^^^^
  |
  = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
  = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `D4EEC737DBC306A9873DFECBC855175357C17FC8247010DD5EE8279A9AEE7023`
 --> D4EEC737DBC306A9873DFECBC855175357C17FC8247010DD5EE8279A9AEE7023.rs:3:63
  |
3 | pub type Foo = impl for<'a> Trait<'a, Assoc = impl Copy + 'a>;
  |                                                               ^ consider adding a `main` function to `D4EEC737DBC306A9873DFECBC855175357C17FC8247010DD5EE8279A9AEE7023.rs`

error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
 --> D4EEC737DBC306A9873DFECBC855175357C17FC8247010DD5EE8279A9AEE7023.rs:3:29
  |
3 | pub type Foo = impl for<'a> Trait<'a, Assoc = impl Copy + 'a>;
  |                             ^^^^^---------------------------- help: remove these generics
  |                             |
  |                             expected 0 lifetime arguments
  |
note: trait defined here, with 0 lifetime parameters
 --> D4EEC737DBC306A9873DFECBC855175357C17FC8247010DD5EE8279A9AEE7023.rs:1:11
  |
1 | pub trait Trait {}
  |           ^^^^^

error[E0220]: associated type `Assoc` not found for `Trait`
 --> D4EEC737DBC306A9873DFECBC855175357C17FC8247010DD5EE8279A9AEE7023.rs:3:39
  |
3 | pub type Foo = impl for<'a> Trait<'a, Assoc = impl Copy + 'a>;
  |                                       ^^^^^ associated type `Assoc` not found

Metadata

Metadata

Labels

C-bugCategory: This is a bug.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 way

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions