linux/rust/pin-init/examples
Benno Lossin 3d53627744 rust: pin-init: examples: error: use Error in fn main()
When running this example with no cargo features enabled, the compiler
warns on 1.89:

  error: struct `Error` is never constructed
    --> examples/error.rs:11:12
     |
  11 | pub struct Error;
     |            ^^^^^
     |
     = note: `-D dead-code` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(dead_code)]`

Thus use the error in the main function to avoid this warning.

Signed-off-by: Benno Lossin <lossin@kernel.org>
2025-09-11 23:25:54 +02:00
..
big_struct_in_place.rs rust: pin-init: rename zeroed to init_zeroed 2025-06-11 21:13:56 +02:00
error.rs rust: pin-init: examples: error: use Error in fn main() 2025-09-11 23:25:54 +02:00
linked_list.rs rust: pin-init: examples, tests: add conditional compilation in order to compile under any feature combination 2025-06-11 21:13:56 +02:00
mutex.rs rust: pin-init: examples, tests: add conditional compilation in order to compile under any feature combination 2025-06-11 21:13:56 +02:00
pthread_mutex.rs rust: pin-init: examples, tests: use ignore instead of conditionally compiling tests 2025-06-11 21:13:57 +02:00
static_init.rs rust: pin-init: examples, tests: add conditional compilation in order to compile under any feature combination 2025-06-11 21:13:56 +02:00