File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1515use std:: mem:: transmute;
1616
1717fn 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
2121fn 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
2525fn c < T , U > ( x : & T ) -> & U {
@@ -31,11 +31,11 @@ fn d<T, U>(x: &[T]) -> &[U] {
3131}
3232
3333fn 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
3737fn 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
4141fn main ( ) { }
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments