-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.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):
fn foo(-128..=127: u128) {}
original:
// Regression test for the ICE described in #82328. The pretty-printer for
// `-Zunpretty=hir,typed` would previously retrieve type-checking results
// when entering a body, which means that type information was not available
// for expressions occurring in function signatures, as in the `foo` example
//~^ ERROR the trait alias `SelfInput` is not dyn compatible [E0038]
//@ check-pass
//@ compile-flags: -Zunpretty=hir,typed
#![allow(dead_code)]
fn main() {}
fn foo(-128..=127: u128) {}
Version information
rustc 1.86.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.86.0-dev
LLVM version: 19.1.7
Possibly related line of code:
rust/compiler/rustc_mir_build/src/thir/pattern/mod.rs
Lines 231 to 243 in 534d79a
_ => { | |
return Ok(()); | |
} | |
}; | |
// Detect literal value out of range `[min, max]` inclusive, avoiding use of `-min` to | |
// prevent overflow/panic. | |
if (negated && lit_val > max + 1) || (!negated && lit_val > max) { | |
return Err(self.tcx.dcx().emit_err(LiteralOutOfRange { span, ty, min, max })); | |
} | |
Ok(()) | |
} | |
fn lower_pattern_range( |
Command:
/home/gh-matthiaskrgr/.rustup/toolchains/local-debug-assertions/bin/rustc
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.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