From 52111783771d9e967a63995b3e2d7c6538fc6b52 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Wed, 1 Jun 2016 19:20:23 +0200 Subject: [PATCH] note that not all literal items are function pointers --- src/interpreter/mod.rs | 2 +- tests/compile-fail/unimplemented.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interpreter/mod.rs b/src/interpreter/mod.rs index a7dedc9ddc6..5592783d863 100644 --- a/src/interpreter/mod.rs +++ b/src/interpreter/mod.rs @@ -982,7 +982,7 @@ fn eval_operand(&mut self, op: &mir::Operand<'tcx>) -> EvalResult { 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. diff --git a/tests/compile-fail/unimplemented.rs b/tests/compile-fail/unimplemented.rs index 010883b7d61..3b99fda9477 100644 --- a/tests/compile-fail/unimplemented.rs +++ b/tests/compile-fail/unimplemented.rs @@ -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; -- 2.44.0