mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Change error message in rustbook
This commit is contained in:
parent
35f8184f7d
commit
a3f9fc69d6
@ -82,7 +82,7 @@ unsafe {
|
||||
with:
|
||||
|
||||
```text
|
||||
error: transmute called on types with different sizes: [u8; 4] (32 bits) to u64
|
||||
error: transmute called with differently sized types: [u8; 4] (32 bits) to u64
|
||||
(64 bits)
|
||||
```
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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() {}
|
||||
|
Loading…
Reference in New Issue
Block a user