1#![allow(unused_variables)]
8
9
10
11#[cfg(feature = "ok")]
13pub fn adjoin() {
14 fn one<'de>(x: &'de str, y: &'de str) -> &'de str {
20 println!("x = {:p}", x);
21 println!("y = {:p}", y);
22 if x.is_empty() {
23 x
24 } else {
25 y
26 }
27 }
28
29 let first_str = "";
30 let second_str = "World";
31 println!("first_str = {:p}", first_str);
32 println!("second_str = {:p}", second_str);
33 let result = one(first_str, second_str);
34
35 println!();
36 println!("first_str = {:p}", first_str);
37 println!("second_str = {:p}", second_str);
38 println!("result = {:p}", result);
39 println!("result = {}", result);
40
41 }
43
44
45
46#[cfg(feature = "cp")]
48pub fn adjoin() {
49 fn one(x: &str, y: &str) {
55 println!("x = {:p}", x);
56 println!("y = {:p}", y);
57 }
58
59 let hello = "Hello";
60 let world = "World";
61 println!("hello = {:p}", hello);
62 println!("world = {:p}", world);
63 one(hello, world);
64
65 }
67
68
69
70
71#[cfg(feature = "okay")]
73pub fn adjoin() {
74 fn one<'cn>(x: &'cn str, y: &str) -> &'cn str {
80 x
81 }
82
83 let first_str = "Hello";
84 let second_str = "World";
85 let result = one(first_str, second_str);
86 println!("result = {}", result);
87
88 }
90
91
92
93#[cfg(feature = "okey")]
95pub fn adjoin() {
96 fn one(input: &str) {
102 println!("one() input = {:p}", input);
103
104 let ret_input = input.to_ascii_uppercase();
105 println!("one() ret_input = {:p}", &ret_input);
106 println!("one() ret_input = {}", ret_input);
107
108 println!("one() input = {:p}", input);
109 println!("one() input = {}", input);
110 }
111
112 let mut instance = String::new();
113 instance.push_str("Hello");
114 println!("after instance change = {:p}", &instance);
115 println!();
116
117 let immut_ref :&str = &instance;
118 println!("before call one instance = {:p}", immut_ref);
119 one(immut_ref);
120 println!("after call one instance = {:p}", immut_ref);
121
122 println!("instance = {}", instance);
123
124 }
126
127
128
129
130#[cfg(feature = "err_07")]
132pub fn adjoin() {
133 fn one(x: &str, y: &str) -> &str {
140 x
141 }
142
143 let first_str = "Hello";
144 let second_str = "World";
145 let result = one(first_str, second_str);
146 println!("result = {}", result);
147
148
149 }
151
152
153
154
155#[cfg(feature = "err_08")]
157pub fn adjoin() {
158 fn one<'cn>(x: &'cn str, y: &str) -> &'cn str {
165 y
166 }
167
168 let first_str = "Hello";
169 let second_str = "World";
170 let result = one(first_str, second_str);
171 println!("result = {}", result);
172
173
174 }
176
177
178
179
180#[cfg(feature = "err_09")]
182pub fn adjoin() {
183 fn one(x: &str, y: &String) -> &str {
190 x
191 }
192
193 let first_str = "Hello";
194 let second_str = "World".to_string();
195 let result = one(first_str, second_str);
196 println!("result = {}", result);
197
198
199 }
201
202
203
204#[cfg(feature = "err_10")]
206pub fn adjoin() {
207 fn one() -> &'de str {
215 "Hello"
216 }
217
218 let result = one();
219 println!("result = {}", result);
220
221 }
223
224
225
226#[cfg(all(
228 not(feature = "ok"),
229 not(feature = "cp"),
230 not(feature = "okay"),
231 not(feature = "okey"),
232 not(feature = "err_07"),
233 not(feature = "err_08"),
234 not(feature = "err_09"),
235 not(feature = "err_10"),
236))]
237pub fn adjoin() {
238 use aide::*;
239 hello();
240}
241
242