-
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.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.
Description
Code:
const C: *const str = "abcd";
fn main() {
match C {
C => {}
_ => {}
}
}
Diagnostics:
warning: broken MIR (Terminator { source_info: SourceInfo { span: <anon>:5:9: 5:10, scope: scope0 }, kind: tmp1 = <str as std::cmp::PartialEq>::eq(tmp0, const "abcd") -> bb3 }): bad arg #0 (&str <- *const str): Sorts(ExpectedFound { expected: &str, found: *const str })
--> <anon>:4:11
|>
4 |> match C {
|> ^
Reproduces on stable/beta/nightly.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.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.