Skip to content

ICE: assertion failed left: '(Projection, AssocConst)' right: ' (ty::Opaque, DefKind::OpaqueTy) | (ty::Projection | ty::Inherent, DefKind::AssocTy) | (ty::Weak, DefKind::TyAlias { .. }) #114744

Closed
@matthiaskrgr

Description

@matthiaskrgr

Code

#![feature(associated_type_bounds)]
pub fn accept(_: impl Trait<K :literal>) {}

pub trait Trait {
    const K: i32;
}

Meta

rustc --version --verbose:

307c573d57616a9f7500168061ce6fdbb5060a58

Error output

error[E0405]: cannot find trait `literal` in this scope
 --> 16B146BFF37904F6EF9A1E30ACB7C3E39641F49B14B5881AE665829AD30E3805.rs:1:32
  |
1 | pub fn accept(_: impl Trait<K :literal>) {}
  |                                ^^^^^^^ not found in this scope

error[E0601]: `main` function not found in crate `16B146BFF37904F6EF9A1E30ACB7C3E39641F49B14B5881AE665829AD30E3805`
 --> 16B146BFF37904F6EF9A1E30ACB7C3E39641F49B14B5881AE665829AD30E3805.rs:5:2
  |
5 | }
  |  ^ consider adding a `main` function to `16B146BFF37904F6EF9A1E30ACB7C3E39641F49B14B5881AE665829AD30E3805.rs`

Metadata

Metadata

Labels

C-bugCategory: This is a bug.F-associated_type_bounds`#![feature(associated_type_bounds)]`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