Closed
Description
Getting an LLVM assertion error on nightly inside of a macro. The error doesn't occur on stable.
The error:
Assertion failed: (C1->getType() == C2->getType() && "Operand types in binary constant expression should match"), function get, file /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/llvm/lib/IR/Constants.cpp, line 1875.
const ERROR_CONST: bool = false;
macro_rules! cause_llvm_assertion_error {
($a: expr, $b: expr, $c: expr) => (
if $a || $b || !($c) {
println!("assertion error?");
}
)
}
pub fn main() {
cause_llvm_assertion_error!(true, false, ERROR_CONST);
}