Open
Description
Code
code from ./compiler/rustc_codegen_gcc/tests/run/condition.rs
#![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)]
#![no_std]
#![no_core]
/*
* Core
*/
// Because we don't have core yet.
#[lang = "sized"]
pub trait Sized {}
#[lang = "copy"]
trait Copy {
}
#[lang = "receiver"]
trait Receiver {
}
mod libc {
#[link(name = "c")]
extern "C" {
pub fn printf(format: *const i8, ...) -> i32;
pub fn puts(s: *const u8) -> i32;
}
}
mod intrinsics {
extern "rust-intrinsic" {
pub fn abort() -> !;
}
}
#[lang = "add"]
trait Add<RHS = Self> {
type Output;
fn add(self, rhs: RHS) -> Self::Output;
}
#[lang = "eq"]
pub trait PartialEq<Rhs: ?Sized = Self> {
fn eq(&self, other: &Rhs) -> bool;
fn ne(&self, other: &Rhs) -> bool;
}
#[start]
fn main(argc: isize, _argv: *const *const u8) -> isize {
let string =
match argc {
1 => b"1\n\0",
_ => b"_\n\0",
};
0
}
Meta
rustc --version --verbose
:
rustc 1.59.0-nightly (c14569225 2022-01-01)
binary: rustc
commit-hash: c145692254e86974941f2c92c643a23df0f13e82
commit-date: 2022-01-01
host: x86_64-unknown-linux-gnu
release: 1.59.0-nightly
LLVM version: 13.0.0
Error output
warning: unused variable: `string`
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:54:13
|
54 | let string =
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_string`
|
= note: `#[warn(unused_variables)]` on by default
warning: function is never used: `printf`
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:25:9
|
25 | pub fn printf(format: *const i8, ...) -> i32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: function is never used: `puts`
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:26:9
|
26 | pub fn puts(s: *const u8) -> i32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: function is never used: `abort`
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:33:9
|
33 | pub fn abort() -> !;
| ^^^^^^^^^^^^^^^^^^^^
warning: 4 warnings emitted
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (start of phase transition from Build) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass CheckPackedRef) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass CheckConstItemMutation) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass FunctionItemReferences) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyCfg-initial) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SanityCheck) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass PhaseChange-Const) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (end of phase transition to Const) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (start of phase transition from Const) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass PromoteTemps) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyCfg-promote-consts) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (end of phase transition to ConstPromotion) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in DefId(0:19 ~ condition[1c5b]::main) (NoSolution): could not prove Binder(TraitPredicate(<isize as Copy>, polarity:Positive), [])
|
= note: delayed at compiler/rustc_borrowck/src/type_check/mod.rs:319:27
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (start of phase transition from ConstPromotion) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass RemoveFalseEdges) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyConstCondition-initial) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass RemoveNoopLandingPads) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass CleanupNonCodegenStatements) at bb0[2]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyCfg-early-opt) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass AddCallGuards) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass ElaborateDrops) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass AbortUnwindingCalls) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass AddMovesForPackedDrops) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass LowerIntrinsics) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyCfg-elaborate-drops) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass Deaggregator) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (end of phase transition to DropLowering) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (start of phase transition from DropLowering) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass LowerSliceLenCalls) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass UninhabitedEnumBranching) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyCfg-after-uninhabited-enum-branching) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass StateTransform) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (end of phase transition to GeneratorLowering) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (start of phase transition from GeneratorLowering) at bb0[1]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass RemoveStorageMarkers) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass RemoveZsts) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass RemoveUnneededDrops) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass InstCombine) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass InstCombine) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass ConstProp) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass ConstProp) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyConstCondition-after-const-prop) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyConstCondition-after-const-prop) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyComparisonIntegral) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyComparisonIntegral) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyArmIdentity) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyArmIdentity) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyBranchSame) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyBranchSame) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyConstCondition-final) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyConstCondition-final) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass RemoveNoopLandingPads) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass RemoveNoopLandingPads) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyCfg-final) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyCfg-final) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass RenameReturnPlace) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass RenameReturnPlace) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyLocals) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass SimplifyLocals) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass AddCallGuards) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass AddCallGuards) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass PhaseChange-Optimization) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass PhaseChange-Optimization) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass PreCodegen) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (after pass PreCodegen) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (end of phase transition to Optimization) at bb0[0]:
`Operand::Copy` with non-`Copy` type isize
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:55:13
|
55 | match argc {
| ^^^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:19 ~ condition[1c5b]::main), const_param_did: None }) (end of phase transition to Optimization) at bb1[1]:
`Operand::Copy` with non-`Copy` type &[u8; 3]
--> ./compiler/rustc_codegen_gcc/tests/run/condition.rs:57:22
|
57 | _ => b"_\n\0",
| ^^^^^^^^
|
= note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:119:36
thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1188:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.59.0-nightly (c14569225 2022-01-01) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z validate-mir
query stack during panic:
end of query stack
Backtrace
thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1188:13
stack backtrace:
0: 0x7fe5eb1ae9bc - std::backtrace_rs::backtrace::libunwind::trace::h65f1c9fa282ae451
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x7fe5eb1ae9bc - std::backtrace_rs::backtrace::trace_unsynchronized::h48355373b51db027
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7fe5eb1ae9bc - std::sys_common::backtrace::_print_fmt::h90451a39c3d7ac2e
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/std/src/sys_common/backtrace.rs:67:5
3: 0x7fe5eb1ae9bc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb2251b6e44ad5ebe
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/std/src/sys_common/backtrace.rs:46:22
4: 0x7fe5eb20f49c - core::fmt::write::hb63f5588b360686a
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/core/src/fmt/mod.rs:1149:17
5: 0x7fe5eb19de33 - std::io::Write::write_fmt::hb59a8c8cd2564937
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/std/src/io/mod.rs:1660:15
6: 0x7fe5eb1b2e82 - std::sys_common::backtrace::_print::h2b32d5daaf650542
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/std/src/sys_common/backtrace.rs:49:5
7: 0x7fe5eb1b2e82 - std::sys_common::backtrace::print::h8fce89e0a2361e4c
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/std/src/sys_common/backtrace.rs:36:9
8: 0x7fe5eb1b2e82 - std::panicking::default_hook::{{closure}}::hcc142fd4af601bd7
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/std/src/panicking.rs:211:50
9: 0x7fe5eb1b2a65 - std::panicking::default_hook::h3f20aebc8a7be054
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/std/src/panicking.rs:228:9
10: 0x7fe5eb94eb91 - rustc_driver[e1b155f8b28a30b9]::DEFAULT_HOOK::{closure#0}::{closure#0}
11: 0x7fe5eb1b3635 - std::panicking::rust_panic_with_hook::hd538abff5aba1fbb
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/std/src/panicking.rs:610:17
12: 0x7fe5eb1b3330 - std::panicking::begin_panic_handler::{{closure}}::h6796463ba832d131
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/std/src/panicking.rs:502:13
13: 0x7fe5eb1aee64 - std::sys_common::backtrace::__rust_end_short_backtrace::h3ce20c3a238e7942
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/std/src/sys_common/backtrace.rs:139:18
14: 0x7fe5eb1b3069 - rust_begin_unwind
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/std/src/panicking.rs:498:5
15: 0x7fe5eb17ad31 - core::panicking::panic_fmt::h944465c5be0ff53f
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/core/src/panicking.rs:107:14
16: 0x7fe5eca33bac - core[d70f99487a0e84d5]::panicking::panic_display::<&str>
17: 0x7fe5ee0b4a0d - <rustc_errors[9c0ded007a8c6810]::HandlerInner>::flush_delayed
18: 0x7fe5ee0b2eed - <rustc_errors[9c0ded007a8c6810]::HandlerInner as core[d70f99487a0e84d5]::ops::drop::Drop>::drop
19: 0x7fe5ed7aa9c6 - core[d70f99487a0e84d5]::ptr::drop_in_place::<rustc_session[1bcf79ec8fc38f2b]::parse::ParseSess>
20: 0x7fe5ed7adbba - <alloc[523fe8aae44a10c6]::rc::Rc<rustc_session[1bcf79ec8fc38f2b]::session::Session> as core[d70f99487a0e84d5]::ops::drop::Drop>::drop
21: 0x7fe5ed77e53c - core[d70f99487a0e84d5]::ptr::drop_in_place::<rustc_interface[1106b44aa5e86d5a]::interface::Compiler>
22: 0x7fe5ed77ed51 - rustc_span[87e3aa93beff5ce5]::with_source_map::<core[d70f99487a0e84d5]::result::Result<(), rustc_errors[9c0ded007a8c6810]::ErrorReported>, rustc_interface[1106b44aa5e86d5a]::interface::create_compiler_and_run<core[d70f99487a0e84d5]::result::Result<(), rustc_errors[9c0ded007a8c6810]::ErrorReported>, rustc_driver[e1b155f8b28a30b9]::run_compiler::{closure#1}>::{closure#1}>
23: 0x7fe5ed7a825e - rustc_interface[1106b44aa5e86d5a]::interface::create_compiler_and_run::<core[d70f99487a0e84d5]::result::Result<(), rustc_errors[9c0ded007a8c6810]::ErrorReported>, rustc_driver[e1b155f8b28a30b9]::run_compiler::{closure#1}>
24: 0x7fe5ed782b32 - std[c0c17edbc27de8c5]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[1106b44aa5e86d5a]::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface[1106b44aa5e86d5a]::interface::run_compiler<core[d70f99487a0e84d5]::result::Result<(), rustc_errors[9c0ded007a8c6810]::ErrorReported>, rustc_driver[e1b155f8b28a30b9]::run_compiler::{closure#1}>::{closure#0}, core[d70f99487a0e84d5]::result::Result<(), rustc_errors[9c0ded007a8c6810]::ErrorReported>>::{closure#0}, core[d70f99487a0e84d5]::result::Result<(), rustc_errors[9c0ded007a8c6810]::ErrorReported>>
25: 0x7fe5ed7acb09 - <<std[c0c17edbc27de8c5]::thread::Builder>::spawn_unchecked<rustc_interface[1106b44aa5e86d5a]::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface[1106b44aa5e86d5a]::interface::run_compiler<core[d70f99487a0e84d5]::result::Result<(), rustc_errors[9c0ded007a8c6810]::ErrorReported>, rustc_driver[e1b155f8b28a30b9]::run_compiler::{closure#1}>::{closure#0}, core[d70f99487a0e84d5]::result::Result<(), rustc_errors[9c0ded007a8c6810]::ErrorReported>>::{closure#0}, core[d70f99487a0e84d5]::result::Result<(), rustc_errors[9c0ded007a8c6810]::ErrorReported>>::{closure#1} as core[d70f99487a0e84d5]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
26: 0x7fe5eb1beb63 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha51db0b689e19840
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/alloc/src/boxed.rs:1811:9
27: 0x7fe5eb1beb63 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h15977bb176cdf7d1
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/alloc/src/boxed.rs:1811:9
28: 0x7fe5eb1beb63 - std::sys::unix::thread::Thread::new::thread_start::hec91ed603947ed42
at /rustc/c145692254e86974941f2c92c643a23df0f13e82/library/std/src/sys/unix/thread.rs:108:17
29: 0x7fe5eb0c7259 - start_thread
30: 0x7fe5eafe35e3 - __GI___clone
31: 0x0 - <unknown>
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.59.0-nightly (c14569225 2022-01-01) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z validate-mir
query stack during panic:
end of query stack
Metadata
Metadata
Assignees
Labels
Category: This is a bug.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.ICE tracked in rust-lang/glacier.