]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/check_const.rs
Address review commets
[rust.git] / src / librustc / middle / check_const.rs
index 6d2465a5cb9d2e14bd5346bd91626c19338943f3..794cc4ff38d341c3eb0c5519fbee623fb366a510 100644 (file)
@@ -443,11 +443,11 @@ fn check_expr<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>,
             debug!("Checking const cast(id={})", from.id);
             match v.tcx.cast_kinds.borrow().get(&from.id) {
                 None => v.tcx.sess.span_bug(e.span, "no kind for cast"),
-                Some(&CastKind::PtrAddrCast) | Some(&CastKind::FPtrAddrCast) => {
+                Some(&CastKind::PtrAddrCast) | Some(&CastKind::FnPtrAddrCast) => {
                     v.add_qualif(ConstQualif::NOT_CONST);
                     if v.mode != Mode::Var {
                         span_err!(v.tcx.sess, e.span, E0018,
-                                  "can not cast a pointer to an integer in {}s", v.msg());
+                                  "can't cast a pointer to an integer in {}s", v.msg());
                     }
                 }
                 _ => {}