From 35f8184f7dde2373f9941f930ed99a59b35a26f9 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 13 Oct 2015 10:25:31 +0200 Subject: [PATCH] Update test error compilation message for E0512 --- src/test/compile-fail/transmute-fat-pointers.rs | 8 ++++---- src/test/compile-fail/transmute-impl.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/compile-fail/transmute-fat-pointers.rs b/src/test/compile-fail/transmute-fat-pointers.rs index 31456853e1c..f7324247f3b 100644 --- a/src/test/compile-fail/transmute-fat-pointers.rs +++ b/src/test/compile-fail/transmute-fat-pointers.rs @@ -15,11 +15,11 @@ use std::mem::transmute; fn a(x: &[T]) -> &U { - unsafe { transmute(x) } //~ ERROR transmute called on types with potentially different sizes + unsafe { transmute(x) } //~ ERROR transmute called with differently sized types } fn b(x: &T) -> &U { - unsafe { transmute(x) } //~ ERROR transmute called on types with potentially different sizes + unsafe { transmute(x) } //~ ERROR transmute called with differently sized types } fn c(x: &T) -> &U { @@ -31,11 +31,11 @@ fn d(x: &[T]) -> &[U] { } fn e(x: &T) -> &U { - unsafe { transmute(x) } //~ ERROR transmute called on types with potentially different sizes + unsafe { transmute(x) } //~ ERROR transmute called with differently sized types } fn f(x: &T) -> &U { - unsafe { transmute(x) } //~ ERROR transmute called on types with potentially different sizes + unsafe { transmute(x) } //~ ERROR transmute called with differently sized types } fn main() { } diff --git a/src/test/compile-fail/transmute-impl.rs b/src/test/compile-fail/transmute-impl.rs index a77a37a77e1..55cebbd6cfc 100644 --- a/src/test/compile-fail/transmute-impl.rs +++ b/src/test/compile-fail/transmute-impl.rs @@ -26,7 +26,7 @@ impl Foo { fn n(x: &T) -> &isize { // Not OK here, because T : Sized is not in scope. - unsafe { transmute(x) } //~ ERROR transmute called on types with potentially different sizes + unsafe { transmute(x) } //~ ERROR transmute called with differently sized types } }