-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed as not planned
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-effects`#![feature(effects)]``#![feature(effects)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-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-internal-featuresThis issue requires the use of internal features.This issue requires the use of internal features.
Description
auto-reduced (treereduce-rust):
pub const fn hmm<T, #[rustc_host] const host: str = true>() -> usize {}
const _: () = {
let x = hmm::<()>();
};
original:
// check-pass
// gate-test-effects
// ^ effects doesn't have a gate so we will trick tidy into thinking this is a gate test
#![feature(const_trait_impl, effects, rustc_attrs)]
// ensure we are passing in the correct host effect in always const contexts.
pub const fn hmm<T, #[rustc_host] const host: str = true>() -> usize {
if Tr {
1
} else {
0
}
}
const _: () = {
let x = hmm::<()>();
assert!(0 == x);
};
pub const fn uwu(x: [u8; hmm::<()>()]) {
let [] = x;
}
fn main() {}Version information
rustc 1.76.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.76.0-dev
LLVM version: 17.0.5
Command:
/home/matthias/.rustup/toolchains/local-debug-assertions/bin/rustc
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-effects`#![feature(effects)]``#![feature(effects)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-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-internal-featuresThis issue requires the use of internal features.This issue requires the use of internal features.