1
1
error: transmute from a reference to a pointer
2
2
--> tests/ui/transmute.rs:31:23
3
3
|
4
- LL | let _: *const T = core::intrinsics ::transmute(t);
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t as *const T`
4
+ LL | let _: *const T = core::mem ::transmute(t);
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t as *const T`
6
6
|
7
7
= note: `-D clippy::useless-transmute` implied by `-D warnings`
8
8
= help: to override `-D warnings` add `#[allow(clippy::useless_transmute)]`
9
9
10
10
error: transmute from a reference to a pointer
11
11
--> tests/ui/transmute.rs:35:21
12
12
|
13
- LL | let _: *mut T = core::intrinsics ::transmute(t);
14
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t as *const T as *mut T`
13
+ LL | let _: *mut T = core::mem ::transmute(t);
14
+ | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t as *const T as *mut T`
15
15
16
16
error: transmute from a reference to a pointer
17
17
--> tests/ui/transmute.rs:38:23
18
18
|
19
- LL | let _: *const U = core::intrinsics ::transmute(t);
20
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t as *const T as *const U`
19
+ LL | let _: *const U = core::mem ::transmute(t);
20
+ | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t as *const T as *const U`
21
21
22
22
error: transmute from a type (`std::vec::Vec<i32>`) to itself
23
23
--> tests/ui/transmute.rs:45:27
24
24
|
25
- LL | let _: Vec<i32> = core::intrinsics ::transmute(my_vec());
26
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25
+ LL | let _: Vec<i32> = core::mem ::transmute(my_vec());
26
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27
27
28
28
error: transmute from a type (`std::vec::Vec<i32>`) to itself
29
29
--> tests/ui/transmute.rs:48:27
@@ -34,8 +34,8 @@ LL | let _: Vec<i32> = core::mem::transmute(my_vec());
34
34
error: transmute from a type (`std::vec::Vec<i32>`) to itself
35
35
--> tests/ui/transmute.rs:51:27
36
36
|
37
- LL | let _: Vec<i32> = std::intrinsics ::transmute(my_vec());
38
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37
+ LL | let _: Vec<i32> = std::mem ::transmute(my_vec());
38
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39
39
40
40
error: transmute from a type (`std::vec::Vec<i32>`) to itself
41
41
--> tests/ui/transmute.rs:54:27
@@ -64,29 +64,29 @@ LL | let _: *const usize = std::mem::transmute(1 + 1usize);
64
64
error: transmute from a type (`*const Usize`) to the type that it points to (`Usize`)
65
65
--> tests/ui/transmute.rs:97:24
66
66
|
67
- LL | let _: Usize = core::intrinsics ::transmute(int_const_ptr);
68
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67
+ LL | let _: Usize = core::mem ::transmute(int_const_ptr);
68
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
69
69
|
70
70
= note: `-D clippy::crosspointer-transmute` implied by `-D warnings`
71
71
= help: to override `-D warnings` add `#[allow(clippy::crosspointer_transmute)]`
72
72
73
73
error: transmute from a type (`*mut Usize`) to the type that it points to (`Usize`)
74
74
--> tests/ui/transmute.rs:101:24
75
75
|
76
- LL | let _: Usize = core::intrinsics ::transmute(int_mut_ptr);
77
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76
+ LL | let _: Usize = core::mem ::transmute(int_mut_ptr);
77
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78
78
79
79
error: transmute from a type (`Usize`) to a pointer to that type (`*const Usize`)
80
80
--> tests/ui/transmute.rs:104:31
81
81
|
82
- LL | let _: *const Usize = core::intrinsics ::transmute(my_int());
83
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82
+ LL | let _: *const Usize = core::mem ::transmute(my_int());
83
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84
84
85
85
error: transmute from a type (`Usize`) to a pointer to that type (`*mut Usize`)
86
86
--> tests/ui/transmute.rs:107:29
87
87
|
88
- LL | let _: *mut Usize = core::intrinsics ::transmute(my_int());
89
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88
+ LL | let _: *mut Usize = core::mem ::transmute(my_int());
89
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90
90
91
91
error: transmute from a `u8` to a `bool`
92
92
--> tests/ui/transmute.rs:114:28
0 commit comments