-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️PG-const-traitsProject group: Const traitsProject group: Const traitsS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: 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.Relevant 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 wayThis issue requires a build of rustc or tooling with debug-assertions in some way
Description
auto-reduced (treereduce-rust):
#[const_trait]
trait Trait {
type Assoc: const Trait;
}
original:
#![feature(const_trait_impl)]
#[const_trait]
trait Trait {
type Assoc: const Trait;
fn func() -> i32;
}
const fn unqualified<T: ~const Trait>() -> i32 {
T::Assoc::func()
}
const fn qualified<T: ~const Trait>() -> i32 {
<T as Trait>::Assoc::func()
}
fn main() {}
Version information
rustc 1.85.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.85.0-dev
LLVM version: 19.1.4
Possibly related line of code:
rust/compiler/rustc_hir_analysis/src/collect/predicates_of.rs
Lines 694 to 706 in dff3e7c
ty::ClauseKind::RegionOutlives(_) | |
| ty::ClauseKind::ConstArgHasType(_, _) | |
| ty::ClauseKind::WellFormed(_) | |
| ty::ClauseKind::ConstEvaluatable(_) | |
| ty::ClauseKind::HostEffect(..) => { | |
bug!( | |
"unexpected non-`Self` predicate when computing \ | |
`{filter:?}` implied bounds: {clause:?}" | |
); | |
} | |
} | |
} |
@rustbot label +F-const_trait_impl
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️PG-const-traitsProject group: Const traitsProject group: Const traitsS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: 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.Relevant 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 wayThis issue requires a build of rustc or tooling with debug-assertions in some way