From 2624772c68de962d44fa6a1bb879578ef2488796 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 10 Oct 2015 23:21:08 +0200 Subject: [PATCH] Improve E0512 error message --- src/librustc_trans/trans/intrinsic.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc_trans/trans/intrinsic.rs b/src/librustc_trans/trans/intrinsic.rs index 0573d6301c5..5e781bdf330 100644 --- a/src/librustc_trans/trans/intrinsic.rs +++ b/src/librustc_trans/trans/intrinsic.rs @@ -135,7 +135,7 @@ pub fn check_intrinsics(ccx: &CrateContext) { if transmute_restriction.original_from != transmute_restriction.substituted_from { span_transmute_size_error(ccx.sess(), transmute_restriction.span, - &format!("transmute called on types with potentially different sizes: \ + &format!("transmute called with differently sized types: \ {} (could be {} bit{}) to {} (could be {} bit{})", transmute_restriction.original_from, from_type_size as usize, @@ -145,7 +145,7 @@ pub fn check_intrinsics(ccx: &CrateContext) { if to_type_size == 1 {""} else {"s"})); } else { span_transmute_size_error(ccx.sess(), transmute_restriction.span, - &format!("transmute called on types with different sizes: \ + &format!("transmute called with differently sized types: \ {} ({} bit{}) to {} ({} bit{})", transmute_restriction.original_from, from_type_size as usize,