-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`F-trait_alias`#![feature(trait_alias)]``#![feature(trait_alias)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-lowLow priorityLow priorityT-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 wayrequires-incomplete-featuresThis issue requires the use of incomplete features.This issue requires the use of incomplete features.
Description
auto-reduced (treereduce-rust):
#![feature(generic_const_exprs)]
trait Bar<const N: usize> {}
trait BB = Bar<{ 1i32 + 1 }>;
fn foo(x: &dyn BB) {}
original:
#![allow(incomplete_features)]
#![feature(generic_const_exprs)]
#![feature(trait_alias)]
trait Bar<const N: usize> {}
trait BB = Bar<{ 1i32 + 1 }>;
fn foo(x: &dyn BB) {}
//~^ ERROR the trait alias `BB` is not dyn compatible [E0038]
fn main(&String) {}
Version information
rustc 1.87.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.87.0-dev
LLVM version: 20.1.0
Possibly related line of code:
https://github.com/rust-lang/rust/blob/unknown/compiler/rustc_middle/src/ty/context.rs#L2724-L2736
Command:
/home/gh-matthiaskrgr/.rustup/toolchains/local-debug-assertions/bin/rustc
Version information
rustc 1.87.0-dev
binary: rustc
commit-hash: b522e7c5ea8334fbccb9dd7f9b33759304743fd0
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.87.0-dev
LLVM version: 20.1.0
Possibly related line of code:
rust/compiler/rustc_middle/src/ty/context.rs
Lines 2724 to 2736 in b522e7c
.iter() | |
.copied() | |
) | |
) | |
); | |
} else { | |
bug!( | |
"args not compatible with generics for {}: args={:#?}, generics={:#?}", | |
self.def_path_str(def_id), | |
args, | |
ty::GenericArgs::identity_for_item(self, def_id) | |
); | |
} |
Command:
/home/gh-matthiaskrgr/.rustup/toolchains/local-debug-assertions/bin/rustc
@rustbot label +F-generic_const_exprs +F-trait_alias
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`F-trait_alias`#![feature(trait_alias)]``#![feature(trait_alias)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-lowLow priorityLow priorityT-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 wayrequires-incomplete-featuresThis issue requires the use of incomplete features.This issue requires the use of incomplete features.