Skip to content

Commit cdd2dfd

Browse files
committed
borrowing_exerci = "0.4.50"
1 parent dd6f44c commit cdd2dfd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2515
-777
lines changed

hello-borrowing/bin-hello/examples/closure/immut_string.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
// clear && cargo run --example closure --features err_01
44
// clear && cargo run --example closure -- immut_string
55

6+
//=======
7+
8+
9+
//=======
610
#[cfg(feature = "ok")]
711
pub fn adjoin() {
812
// ANCHOR: feature-ok
@@ -24,6 +28,7 @@ pub fn adjoin() {
2428
// ANCHOR_END: feature-ok
2529
}
2630

31+
//=======
2732
#[cfg(feature = "err_01")]
2833
pub fn adjoin() {
2934
// ANCHOR: feature-err
@@ -40,6 +45,8 @@ pub fn adjoin() {
4045
// ANCHOR_END: feature-err
4146
}
4247

48+
49+
//=======
4350
#[cfg(all(not(feature = "ok"), not(feature = "err_01")))]
4451
pub fn adjoin() {
4552
use aide::hello;

hello-borrowing/bin-hello/examples/closure/kw_move.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
// clear && cargo run --example closure --features err_02
44
// clear && cargo run --example closure -- kw_move
55

6+
//=======
7+
8+
9+
//=======
610
#[cfg(feature = "ok")]
711
pub fn adjoin() {
812
// ANCHOR: feature-ok
@@ -20,6 +24,8 @@ pub fn adjoin() {
2024
// ANCHOR_END: feature-ok
2125
}
2226

27+
28+
//=======
2329
#[cfg(feature = "cp")]
2430
pub fn adjoin() {
2531
// ANCHOR: feature-cp
@@ -40,6 +46,8 @@ pub fn adjoin() {
4046
// ANCHOR_END: feature-cp
4147
}
4248

49+
50+
//=======
4351
#[cfg(feature = "err_02")]
4452
pub fn adjoin() {
4553
// ANCHOR: feature-err
@@ -62,6 +70,8 @@ pub fn adjoin() {
6270
// ANCHOR_END: feature-err
6371
}
6472

73+
74+
//=======
6575
#[cfg(all(not(feature = "ok"), not(feature = "err_02"), not(feature = "cp")))]
6676
pub fn adjoin() {
6777
use aide::hello;

hello-borrowing/bin-hello/examples/closure/mut_move.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
// clear && cargo run --example closure --features err_05
44
// clear && cargo run --example closure --features err_06
55

6+
//=======
7+
8+
9+
//=======
610
#[cfg(feature = "ok")]
711
pub fn adjoin() {
812
let mut x = 0;
@@ -24,7 +28,7 @@ pub fn adjoin() {
2428

2529

2630

27-
31+
//=======
2832
#[cfg(feature = "okay")]
2933
pub fn adjoin() {
3034
let mut x = 0;
@@ -49,7 +53,7 @@ pub fn adjoin() {
4953

5054

5155

52-
56+
//=======
5357
#[cfg(feature = "err_05")]
5458
pub fn adjoin() {
5559
let mut x = 0;
@@ -73,7 +77,7 @@ pub fn adjoin() {
7377

7478

7579

76-
80+
//=======
7781
#[cfg(all(
7882
not(feature = "ok"),
7983
not(feature = "okay"),

hello-borrowing/bin-hello/examples/dbg/mut_macro.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
// clear && cargo run --example dbg --features err_03
77
// clear && cargo run --example dbg --features err_04
88

9+
//=======
910

11+
12+
13+
//=======
1014
#[cfg(feature = "ok")]
1115
pub fn adjoin() {
1216
// ANCHOR: feature-ok
@@ -24,6 +28,7 @@ pub fn adjoin() {
2428

2529

2630

31+
//=======
2732
#[cfg(feature = "cp")]
2833
pub fn adjoin() {
2934
// ANCHOR: feature-cp
@@ -40,6 +45,7 @@ pub fn adjoin() {
4045

4146

4247

48+
//=======
4349
#[cfg(feature = "err_01")]
4450
pub fn adjoin() {
4551
// ANCHOR: feature-error_01
@@ -56,6 +62,7 @@ pub fn adjoin() {
5662

5763

5864

65+
//=======
5966
#[cfg(feature = "err_02")]
6067
pub fn adjoin() {
6168
// ANCHOR: feature-error_02
@@ -72,6 +79,7 @@ pub fn adjoin() {
7279

7380

7481

82+
//=======
7583
#[cfg(feature = "err_03")]
7684
pub fn adjoin() {
7785
// ANCHOR: feature-error_03
@@ -91,6 +99,7 @@ pub fn adjoin() {
9199

92100

93101

102+
//=======
94103
#[cfg(feature = "err_04")]
95104
pub fn adjoin() {
96105
// ANCHOR: feature-error_04
@@ -108,7 +117,7 @@ pub fn adjoin() {
108117
}
109118

110119

111-
120+
//=======
112121
#[cfg(all(
113122
not(feature = "ok"),
114123
not(feature = "cp"),
@@ -117,7 +126,7 @@ pub fn adjoin() {
117126
not(feature = "err_03"),
118127
not(feature = "err_04"),
119128
))]
120-
fn main() {
129+
pub fn adjoin() {
121130
use aide::*;
122131
hello();
123132
}

hello-borrowing/bin-hello/examples/expand/struct_str.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
// clear && cargo run --example expand --features err_08 -- struct_str
99
// clear && cargo expand --example expand --features err_08 -- struct_str
1010

11+
//=======
1112
#![allow(unused_variables)]
1213

14+
15+
//=======
1316
#[cfg(feature = "ok")]
1417
pub fn adjoin() {
1518
// ANCHOR: feature-ok
@@ -31,6 +34,8 @@ pub fn adjoin() {
3134
// ANCHOR_END: feature-ok
3235
}
3336

37+
38+
//=======
3439
#[cfg(feature = "cp")]
3540
pub fn adjoin() {
3641
// ANCHOR: feature-cp
@@ -52,6 +57,8 @@ pub fn adjoin() {
5257
// ANCHOR_END: feature-cp
5358
}
5459

60+
61+
//=======
5562
#[cfg(feature = "err_07")]
5663
pub fn adjoin() {
5764
// ANCHOR: feature-error_01
@@ -75,6 +82,8 @@ pub fn adjoin() {
7582
// ANCHOR_END: feature-error_01
7683
}
7784

85+
86+
//=======
7887
#[cfg(feature = "err_08")]
7988
pub fn adjoin() {
8089
// ANCHOR: feature-error_02
@@ -98,6 +107,8 @@ pub fn adjoin() {
98107
// ANCHOR_END: feature-error_02
99108
}
100109

110+
111+
//=======
101112
#[cfg(feature = "err_09")]
102113
pub fn adjoin() {
103114
// ANCHOR: feature-error_03
@@ -119,6 +130,8 @@ pub fn adjoin() {
119130
// ANCHOR_END: feature-error_03
120131
}
121132

133+
134+
//=======
122135
#[cfg(all(
123136
not(feature = "ok"),
124137
not(feature = "cp"),

hello-borrowing/bin-hello/examples/expand/struct_string.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
// clear && cargo run --example expand --features err_04 -- struct_string
44
// clear && cargo run --example expand --features err_05 -- struct_string
55

6+
//=======
67
#![allow(unused_variables)]
78

9+
10+
//=======
811
#[cfg(feature = "ok")]
912
pub fn adjoin() {
1013
// ANCHOR: feature-ok
@@ -26,6 +29,8 @@ pub fn adjoin() {
2629
// ANCHOR_END: feature-ok
2730
}
2831

32+
33+
//=======
2934
#[cfg(feature = "err_04")]
3035
pub fn adjoin() {
3136
// ANCHOR: feature-error_01
@@ -45,6 +50,8 @@ pub fn adjoin() {
4550
// ANCHOR_END: feature-error_01
4651
}
4752

53+
54+
//=======
4855
#[cfg(feature = "err_05")]
4956
pub fn adjoin() {
5057
// ANCHOR: feature-error_02
@@ -67,6 +74,8 @@ pub fn adjoin() {
6774
// ANCHOR_END: feature-error_02
6875
}
6976

77+
78+
//=======
7079
#[cfg(feature = "err_06")]
7180
pub fn adjoin() {
7281
// ANCHOR: feature-error_03
@@ -89,6 +98,8 @@ pub fn adjoin() {
8998
// ANCHOR_END: feature-error_03
9099
}
91100

101+
102+
//=======
92103
#[cfg(all(
93104
not(feature = "ok"),
94105
not(feature = "err_04"),

hello-borrowing/bin-hello/examples/expand/struct_u8.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
// clear && cargo run --example expand --features err_03 -- struct_u8
99
// clear && cargo expand --example expand --features err_03 -- struct_u8
1010

11+
//=======
1112
#![allow(unused_variables)]
1213

14+
15+
//=======
1316
#[cfg(feature = "ok")]
1417
pub fn adjoin() {
1518
// ANCHOR: feature-ok
@@ -31,6 +34,8 @@ pub fn adjoin() {
3134
// ANCHOR_END: feature-ok
3235
}
3336

37+
38+
//=======
3439
#[cfg(feature = "cp")]
3540
pub fn adjoin() {
3641
// ANCHOR: feature-cp
@@ -52,6 +57,8 @@ pub fn adjoin() {
5257
// ANCHOR_END: feature-cp
5358
}
5459

60+
61+
//=======
5562
#[cfg(feature = "err_01")]
5663
pub fn adjoin() {
5764
// ANCHOR: feature-error_01
@@ -74,6 +81,8 @@ pub fn adjoin() {
7481
// ANCHOR_END: feature-error_01
7582
}
7683

84+
85+
//=======
7786
#[cfg(feature = "err_02")]
7887
pub fn adjoin() {
7988
// ANCHOR: feature-error_02
@@ -97,6 +106,8 @@ pub fn adjoin() {
97106
// ANCHOR_END: feature-error_02
98107
}
99108

109+
110+
//=======
100111
#[cfg(feature = "err_03")]
101112
pub fn adjoin() {
102113
// ANCHOR: feature-error_03
@@ -117,6 +128,8 @@ pub fn adjoin() {
117128
// ANCHOR_END: feature-error_03
118129
}
119130

131+
132+
//=======
120133
#[cfg(feature = "err_10")]
121134
pub fn adjoin() {
122135
// ANCHOR: feature-error_04
@@ -134,6 +147,8 @@ pub fn adjoin() {
134147
// ANCHOR_END: feature-error_04
135148
}
136149

150+
151+
//=======
137152
#[cfg(all(
138153
not(feature = "ok"),
139154
not(feature = "cp"),

hello-borrowing/bin-hello/examples/expand/use_struct.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
// clear && cargo expand --example expand -- use_struct
33
// clear && cargo run --example expand -- use_struct
44

5+
//=======
56
#![allow(unused_variables)]
67

8+
9+
//=======
10+
#[cfg(feature = "ok")]
711
pub fn adjoin() {
812
#[derive(Clone, Copy)]
913
struct Struct(u8);
@@ -14,3 +18,14 @@ pub fn adjoin() {
1418

1519
let _ = a;
1620
}
21+
22+
23+
24+
//=======
25+
#[cfg(all(
26+
not(feature = "ok"),
27+
))]
28+
pub fn adjoin() {
29+
use aide::*;
30+
hello();
31+
}

0 commit comments

Comments
 (0)