ref-cast 1.0.25

Safely cast &T to &U where the struct U contains a single field of type T.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
error: ref_cast_custom function is required to have a single argument
 --> tests/ui/extra-arg.rs:9:33
  |
9 |     pub fn ref_cast(s: &String, wat: i32) -> &Self;
  |                                 ^^^^^^^^

error: associated function in `impl` without body
 --> tests/ui/extra-arg.rs:9:5
  |
9 |     pub fn ref_cast(s: &String, wat: i32) -> &Self;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
  |                                                   |
  |                                                   help: provide a definition for the function: `{ <body> }`