Skip to content

Commit 35f8184

Browse files
Update test error compilation message for E0512
1 parent 2624772 commit 35f8184

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/test/compile-fail/transmute-fat-pointers.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
use std::mem::transmute;
1616

1717
fn a<T, U: ?Sized>(x: &[T]) -> &U {
18-
unsafe { transmute(x) } //~ ERROR transmute called on types with potentially different sizes
18+
unsafe { transmute(x) } //~ ERROR transmute called with differently sized types
1919
}
2020

2121
fn b<T: ?Sized, U: ?Sized>(x: &T) -> &U {
22-
unsafe { transmute(x) } //~ ERROR transmute called on types with potentially different sizes
22+
unsafe { transmute(x) } //~ ERROR transmute called with differently sized types
2323
}
2424

2525
fn c<T, U>(x: &T) -> &U {
@@ -31,11 +31,11 @@ fn d<T, U>(x: &[T]) -> &[U] {
3131
}
3232

3333
fn e<T: ?Sized, U>(x: &T) -> &U {
34-
unsafe { transmute(x) } //~ ERROR transmute called on types with potentially different sizes
34+
unsafe { transmute(x) } //~ ERROR transmute called with differently sized types
3535
}
3636

3737
fn f<T, U: ?Sized>(x: &T) -> &U {
38-
unsafe { transmute(x) } //~ ERROR transmute called on types with potentially different sizes
38+
unsafe { transmute(x) } //~ ERROR transmute called with differently sized types
3939
}
4040

4141
fn main() { }

src/test/compile-fail/transmute-impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl<T: ?Sized> Foo<T> {
2626

2727
fn n(x: &T) -> &isize {
2828
// Not OK here, because T : Sized is not in scope.
29-
unsafe { transmute(x) } //~ ERROR transmute called on types with potentially different sizes
29+
unsafe { transmute(x) } //~ ERROR transmute called with differently sized types
3030
}
3131
}
3232

0 commit comments

Comments
 (0)