1#![allow(unused_variables)]
8
9
10
11
12#[cfg(feature = "ok")]
14pub fn adjoin() {
15 fn one(input: &mut String) {
21 input.push_str(", world");
22 println!("one() input = {:p}", input);
23 }
24
25 fn two(input: &mut String) {
26 input.push('!');
27 println!("two() input = {:p}", input);
28 }
29
30 let mut instance = String::new();
31 println!("instance = {:p}", &instance);
32
33 instance.push_str("Hello");
34 let mut_ref = &mut instance;
35 println!("mut_ref = {:p}", mut_ref);
36
37 one(mut_ref);
38 two(mut_ref);
39
40 println!("instance = {:p}", &instance);
41 println!("{}", instance);
42
43 }
45
46
47
48#[cfg(feature = "cp")]
50pub fn adjoin() {
51 fn one(input: &str) -> String {
58 println!("input = {:p}", input);
59 let result = format!("{}{}", input, "!");
60 println!("input = {:p}", input);
61 println!("input = {}", input);
62 println!("result = {:p}", &result);
63 println!("result = {}", result);
64 result
65 }
66
67 fn two(input: &str) -> String {
68 println!("input = {:p}", input);
69 let result = format!("{}{}", input, "?");
70 println!("input = {:p}", input);
71 println!("input = {}", input);
72 println!("result = {:p}", &result);
73 println!("result = {}", result);
74 result
75 }
76
77 let mut instance = String::new();
78 println!("instance = {:p}", &instance);
79
80 instance.push_str("Hello");
81
82 let mut mut_ref :&str = &instance;
83 println!();
84 println!("mut_ref = {:p}", mut_ref);
85 instance = one(mut_ref);
86
87 mut_ref = &instance;
88 println!();
89 println!("mut_ref = {:p}", mut_ref);
90 instance = two(mut_ref);
91
92 println!();
93 println!("instance = {:p}", &instance);
94 println!("{}", instance);
95
96
97 }
99
100
101
102
103#[cfg(feature = "okay")]
105pub fn adjoin() {
106 fn one(mut input: String) {
112 input.push_str(", world");
113 println!("input = {:p}", &input);
114 println!("input = {}", input);
115 }
116
117 let mut instance = String::new();
118 println!("instance = {:p}", &instance);
119 instance.push_str("Hello");
120
121 one(instance);
122
123 }
125
126
127
128#[cfg(feature = "okey")]
130pub fn adjoin() {
131 fn one(x: &str, y: &String) {
137 x.to_ascii_uppercase();
138 }
139
140 let first_str = "Hello";
141 let second_str = "World".to_string();
142 one(first_str, &second_str);
143
144 }
146
147
148
149#[cfg(feature = "err_04")]
151pub fn adjoin() {
152 fn one(mut input: String) {
159 input.push_str(", world");
160 println!("input = {:p}", &input);
161 }
162
163 let mut instance = String::new();
164 println!("instance = {:p}", &instance);
165 instance.push_str("Hello");
166
167 one(instance);
168
169 println!("{}", instance);
170
171 }
173
174
175
176#[cfg(feature = "err_05")]
178pub fn adjoin() {
179 fn one(input: &String) {
187 input.push_str(", world");
188 println!("input = {:p}", input);
189 }
190
191 fn two(input: &String) {
193 input.push('!');
194 println!("input = {:p}", input);
195 }
196
197 let mut instance = String::new();
198 println!("instance = {:p}", &instance);
199
200 instance.push_str("Hello");
201 let mut_ref = &mut instance;
202 println!("mut_ref = {:p}", mut_ref);
203
204 one(mut_ref);
205 two(mut_ref);
206
207 println!("instance = {:p}", &instance);
208 println!("{}", instance);
209
210 }
216
217
218
219#[cfg(feature = "err_06")]
221pub fn adjoin() {
222 fn one(input: String) {
229 input.push_str(", world");
230 println!("input = {:p}", &input);
231 }
232
233 let mut instance = String::new();
234 println!("instance = {:p}", &instance);
235 instance.push_str("Hello");
236
237 one(instance);
238
239 }
241
242
243
244
245#[cfg(all(
247 not(feature = "ok"),
248 not(feature = "cp"),
249 not(feature = "okay"),
250 not(feature = "okey"),
251 not(feature = "err_04"),
252 not(feature = "err_05"),
253 not(feature = "err_06"),
254))]
255pub fn adjoin() {
256 use aide::*;
257 hello();
258}
259
260