expand/use_struct.rs
1// File: ./examples/expand/use_struct.rs
2// clear && cargo expand --example expand -- use_struct
3// clear && cargo run --example expand -- use_struct
4
5//=======
6#![allow(unused_variables)]
7
8
9//=======
10#[cfg(feature = "ok")]
11pub fn adjoin() {
12 #[derive(Clone, Copy)]
13 struct Struct(u8);
14
15 let a = Struct(42u8);
16 let b = a.clone();
17 let c = a;
18
19 let _ = a;
20}
21
22
23
24//=======
25#[cfg(all(
26 not(feature = "ok"),
27))]
28pub fn adjoin() {
29 use aide::*;
30 hello();
31}