summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/from_raw_with_void_ptr.stderr
blob: 96e4af12ba386ccc4878fb572bea7be2dffcde5f (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
55
56
57
58
59
60
61
62
63
error: creating a `Box` from a void raw pointer
  --> $DIR/from_raw_with_void_ptr.rs:10:22
   |
LL |     let _ = unsafe { Box::from_raw(ptr) };
   |                      ^^^^^^^^^^^^^^^^^^
   |
help: cast this to a pointer of the appropriate type
  --> $DIR/from_raw_with_void_ptr.rs:10:36
   |
LL |     let _ = unsafe { Box::from_raw(ptr) };
   |                                    ^^^
   = note: `-D clippy::from-raw-with-void-ptr` implied by `-D warnings`

error: creating a `Rc` from a void raw pointer
  --> $DIR/from_raw_with_void_ptr.rs:21:22
   |
LL |     let _ = unsafe { Rc::from_raw(ptr) };
   |                      ^^^^^^^^^^^^^^^^^
   |
help: cast this to a pointer of the appropriate type
  --> $DIR/from_raw_with_void_ptr.rs:21:35
   |
LL |     let _ = unsafe { Rc::from_raw(ptr) };
   |                                   ^^^

error: creating a `Arc` from a void raw pointer
  --> $DIR/from_raw_with_void_ptr.rs:25:22
   |
LL |     let _ = unsafe { Arc::from_raw(ptr) };
   |                      ^^^^^^^^^^^^^^^^^^
   |
help: cast this to a pointer of the appropriate type
  --> $DIR/from_raw_with_void_ptr.rs:25:36
   |
LL |     let _ = unsafe { Arc::from_raw(ptr) };
   |                                    ^^^

error: creating a `Weak` from a void raw pointer
  --> $DIR/from_raw_with_void_ptr.rs:29:22
   |
LL |     let _ = unsafe { std::rc::Weak::from_raw(ptr) };
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: cast this to a pointer of the appropriate type
  --> $DIR/from_raw_with_void_ptr.rs:29:46
   |
LL |     let _ = unsafe { std::rc::Weak::from_raw(ptr) };
   |                                              ^^^

error: creating a `Weak` from a void raw pointer
  --> $DIR/from_raw_with_void_ptr.rs:33:22
   |
LL |     let _ = unsafe { std::sync::Weak::from_raw(ptr) };
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: cast this to a pointer of the appropriate type
  --> $DIR/from_raw_with_void_ptr.rs:33:48
   |
LL |     let _ = unsafe { std::sync::Weak::from_raw(ptr) };
   |                                                ^^^

error: aborting due to 5 previous errors