]> git.lizzy.rs Git - rust.git/commitdiff
note that not all literal items are function pointers
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Wed, 1 Jun 2016 17:20:23 +0000 (19:20 +0200)
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Wed, 1 Jun 2016 17:20:23 +0000 (19:20 +0200)
src/interpreter/mod.rs
tests/compile-fail/unimplemented.rs

index a7dedc9ddc65b4075c5beab1e1a1e4eb436e84ab..5592783d86329cb6abbd944f28e723199837d018 100644 (file)
@@ -982,7 +982,7 @@ fn eval_operand(&mut self, op: &mir::Operand<'tcx>) -> EvalResult<Pointer> {
                 use rustc::mir::repr::Literal::*;
                 match *literal {
                     Value { ref value } => Ok(self.const_to_ptr(value)?),
-                    Item { .. } => Err(EvalError::Unimplemented(format!("function pointers are unimplemented"))),
+                    Item { .. } => Err(EvalError::Unimplemented(format!("literal items (e.g. mentions of function items) are unimplemented"))),
                     Promoted { index } => {
                         // TODO(solson): Mark constants and statics as read-only and cache their
                         // values.
index 010883b7d617f88afe533fde9703d31ab65afa17..3b99fda9477dca98aa4a76e36fec906f039356b0 100644 (file)
@@ -1,7 +1,7 @@
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]
 
-//error-pattern:function pointers are unimplemented
+//error-pattern:literal items (e.g. mentions of function items) are unimplemented
 
 static mut X: usize = 5;