-
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-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-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):
#![feature(generic_const_exprs)]
struct Foo;
impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
where
[(); 1 + 0]: Sized,
{
fn unimplemented(self, _: &Foo) -> Self::Output {
loop {}
}
}
original:
//@ revisions: rpass
#![feature(generic_const_exprs)]
#![call_test(incomplete_features)]
struct Foo;
impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
where
[(); 1 + 0]: Sized,
{
type Output = ();
fn unimplemented(self, _: &Foo) -> Self::Output {
loop {}
}
}
fn writes_to_path() {
Foo([])
}
Version information
rustc 1.84.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.84.0-dev
LLVM version: 19.1.3
Possibly related line of code:
rust/compiler/rustc_infer/src/infer/mod.rs
Lines 629 to 641 in fda6892
param_env_for_debug_assertion: ty::ParamEnv<'tcx>, | |
) -> TypingMode<'tcx> { | |
if cfg!(debug_assertions) { | |
match (param_env_for_debug_assertion.reveal(), self.typing_mode) { | |
(Reveal::All, TypingMode::PostAnalysis) | |
| (Reveal::UserFacing, TypingMode::Coherence | TypingMode::Analysis { .. }) => {} | |
(r, t) => unreachable!("TypingMode x Reveal mismatch: {r:?} {t:?}"), | |
} | |
} | |
self.typing_mode | |
} | |
#[inline(always)] |
@rustbot label +F-generic_const_exprs
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)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-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