Skip to content

Commit a3f9fc6

Browse files
Change error message in rustbook
1 parent 35f8184 commit a3f9fc6

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/doc/trpl/casting-between-types.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ unsafe {
8282
with:
8383

8484
```text
85-
error: transmute called on types with different sizes: [u8; 4] (32 bits) to u64
85+
error: transmute called with differently sized types: [u8; 4] (32 bits) to u64
8686
(64 bits)
8787
```
8888

src/test/compile-fail/packed-struct-generic-transmute.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// the error points to the start of the file, not the line with the
1414
// transmute
1515

16-
// error-pattern: transmute called on types with different size
16+
// error-pattern: transmute called with differently sized types
1717

1818
use std::mem;
1919

src/test/compile-fail/packed-struct-transmute.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// the error points to the start of the file, not the line with the
1414
// transmute
1515

16-
// error-pattern: transmute called on types with different size
16+
// error-pattern: transmute called with differently sized types
1717

1818
use std::mem;
1919

src/test/compile-fail/transmute-different-sizes.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ use std::mem::transmute;
1616

1717
unsafe fn f() {
1818
let _: i8 = transmute(16i16);
19-
//~^ ERROR transmute called on types with different sizes
19+
//~^ ERROR transmute called with differently sized types
2020
}
2121

2222
unsafe fn g<T>(x: &T) {
2323
let _: i8 = transmute(x);
24-
//~^ ERROR transmute called on types with potentially different sizes
24+
//~^ ERROR transmute called with differently sized types
2525
}
2626

2727
fn main() {}

0 commit comments

Comments
 (0)