Skip to content

Commit

Permalink
Update test error compilation message for E0512
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 13, 2015
1 parent 2624772 commit 35f8184
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/test/compile-fail/transmute-fat-pointers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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() { }
2 changes: 1 addition & 1 deletion src/test/compile-fail/transmute-impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 35f8184

Please sign in to comment.