summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/ptr_as_ptr.stderr
blob: 78d733994ac691c56b844fb1e2d2e77051428b43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
error: `as` casting between raw pointers without changing its mutability
  --> $DIR/ptr_as_ptr.rs:14:13
   |
LL |     let _ = ptr as *const i32;
   |             ^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast::<i32>()`
   |
   = note: `-D clippy::ptr-as-ptr` implied by `-D warnings`

error: `as` casting between raw pointers without changing its mutability
  --> $DIR/ptr_as_ptr.rs:15:13
   |
LL |     let _ = mut_ptr as *mut i32;
   |             ^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast::<i32>()`

error: `as` casting between raw pointers without changing its mutability
  --> $DIR/ptr_as_ptr.rs:20:17
   |
LL |         let _ = *ptr_ptr as *const i32;
   |                 ^^^^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `(*ptr_ptr).cast::<i32>()`

error: `as` casting between raw pointers without changing its mutability
  --> $DIR/ptr_as_ptr.rs:33:25
   |
LL |     let _: *const i32 = ptr as *const _;
   |                         ^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast()`

error: `as` casting between raw pointers without changing its mutability
  --> $DIR/ptr_as_ptr.rs:34:23
   |
LL |     let _: *mut i32 = mut_ptr as _;
   |                       ^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast()`

error: `as` casting between raw pointers without changing its mutability
  --> $DIR/ptr_as_ptr.rs:37:21
   |
LL |     let _ = inline!($ptr as *const i32);
   |                     ^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `$ptr.cast::<i32>()`
   |
   = note: this error originates in the macro `__inline_mac_fn_main` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `as` casting between raw pointers without changing its mutability
  --> $DIR/ptr_as_ptr.rs:58:13
   |
LL |     let _ = ptr as *const i32;
   |             ^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast::<i32>()`

error: `as` casting between raw pointers without changing its mutability
  --> $DIR/ptr_as_ptr.rs:59:13
   |
LL |     let _ = mut_ptr as *mut i32;
   |             ^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast::<i32>()`

error: aborting due to 8 previous errors