summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorOliver Schneider <github35764891676564198441@oli-obk.de>2018-05-18 09:41:24 +0200
committerOliver Schneider <github35764891676564198441@oli-obk.de>2018-05-19 13:10:51 +0200
commit27e710f55744534d6b0d54f507eea87bdbfe1916 (patch)
tree5c6aa5581c556400dbb6d6521f1c9453adf6e542 /src/librustc_codegen_llvm
parentd81651e8e9af5c8c40a4bd9b6b7becf12486bdad (diff)
downloadrust-27e710f55744534d6b0d54f507eea87bdbfe1916.tar.gz
rust-27e710f55744534d6b0d54f507eea87bdbfe1916.zip
Add a test showing the erroneous promoted bug
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/mir/operand.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/mir/operand.rs b/src/librustc_codegen_llvm/mir/operand.rs
index 62ef58f8255..caa67ef01c2 100644
--- a/src/librustc_codegen_llvm/mir/operand.rs
+++ b/src/librustc_codegen_llvm/mir/operand.rs
@@ -407,10 +407,10 @@ impl<'a, 'tcx> FunctionCx<'a, 'tcx> {
                     .unwrap_or_else(|err| {
                         match constant.literal {
                             mir::Literal::Promoted { .. } => {
-                                // don't report errors inside promoteds, just warnings.
+                                // FIXME: generate a panic here
                             },
                             mir::Literal::Value { .. } => {
-                                err.report(bx.tcx(), constant.span, "const operand")
+                                err.report(bx.tcx(), constant.span, "const operand");
                             },
                         }
                         // We've errored, so we don't have to produce working code.