Auto merge of #28957 - GuillaumeGomez:patch-5, r=Manishearth

cc @nagisa
This commit is contained in:
bors 2015-10-16 09:49:50 +00:00
commit beeaea4a70
7 changed files with 12 additions and 12 deletions

View file

@ -13,7 +13,7 @@
// the error points to the start of the file, not the line with the
// transmute
// error-pattern: transmute called on types with different size
// error-pattern: transmute called with differently sized types
use std::mem;

View file

@ -13,7 +13,7 @@
// the error points to the start of the file, not the line with the
// transmute
// error-pattern: transmute called on types with different size
// error-pattern: transmute called with differently sized types
use std::mem;

View file

@ -16,12 +16,12 @@ use std::mem::transmute;
unsafe fn f() {
let _: i8 = transmute(16i16);
//~^ ERROR transmute called on types with different sizes
//~^ ERROR transmute called with differently sized types
}
unsafe fn g<T>(x: &T) {
let _: i8 = transmute(x);
//~^ ERROR transmute called on types with potentially different sizes
//~^ ERROR transmute called with differently sized types
}
fn main() {}

View file

@ -15,11 +15,11 @@
use std::mem::transmute;
fn a<T, U: ?Sized>(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<T: ?Sized, U: ?Sized>(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<T, U>(x: &T) -> &U {
@ -31,11 +31,11 @@ fn d<T, U>(x: &[T]) -> &[U] {
}
fn e<T: ?Sized, U>(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<T, U: ?Sized>(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() { }

View file

@ -26,7 +26,7 @@ impl<T: ?Sized> Foo<T> {
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
}
}