about summary refs log tree commit diff
path: root/src/rustc
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-03-07 14:14:34 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-03-07 14:14:34 -0800
commit90ac69904f758cc4ae3d86d4b6bf4a1602606b3f (patch)
tree5b205435fc9a6737d65b54af2579ffa6a1d4df8c /src/rustc
parent5c4ffd0dd7fb717cdc6f015c0d76043a0d8d4c83 (diff)
downloadrust-90ac69904f758cc4ae3d86d4b6bf4a1602606b3f.tar.gz
rust-90ac69904f758cc4ae3d86d4b6bf4a1602606b3f.zip
Improve a type error message (avoid the word 'non-dereferenceable')
Diffstat (limited to 'src/rustc')
-rw-r--r--src/rustc/middle/typeck.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rustc/middle/typeck.rs b/src/rustc/middle/typeck.rs
index 88911e2eae7..a5e0b3f0ade 100644
--- a/src/rustc/middle/typeck.rs
+++ b/src/rustc/middle/typeck.rs
@@ -2163,10 +2163,9 @@ fn check_expr_with_unifier(fcx: @fn_ctxt, expr: @ast::expr, unify: unifier,
                 require_unsafe(tcx.sess, fcx.purity, expr.span);
               }
               _ {
-                tcx.sess.span_err(expr.span,
-                                    "dereferencing non-" +
-                                        "dereferenceable type: " +
-                                        ty_to_str(tcx, oper_t));
+                  tcx.sess.span_err(expr.span,
+                      #fmt("Type %s cannot be dereferenced",
+                           ty_to_str(tcx, oper_t)));
               }
             }
           }