@@ -90,6 +90,8 @@ macro_rules! rust_target_base {
90
90
=> Stable_1_0 => 1.0 ;
91
91
/// Rust stable 1.19
92
92
=> Stable_1_19 => 1.19 ;
93
+ /// Rust stable 1.21
94
+ => Stable_1_21 => 1.21 ;
93
95
/// Nightly rust
94
96
=> Nightly => nightly;
95
97
) ;
@@ -100,7 +102,7 @@ rust_target_base!(rust_target_def);
100
102
rust_target_base ! ( rust_target_values_def) ;
101
103
102
104
/// Latest stable release of Rust
103
- pub const LATEST_STABLE_RUST : RustTarget = RustTarget :: Stable_1_19 ;
105
+ pub const LATEST_STABLE_RUST : RustTarget = RustTarget :: Stable_1_21 ;
104
106
105
107
/// Create RustFeatures struct definition, new(), and a getter for each field
106
108
macro_rules! rust_feature_def {
@@ -142,6 +144,8 @@ rust_feature_def!(
142
144
=> const_fn;
143
145
/// `thiscall` calling convention ([Tracking issue](https://github.com/rust-lang/rust/issues/42202))
144
146
=> thiscall_abi;
147
+ /// builtin impls for `Clone` ([PR](https://github.com/rust-lang/rust/pull/43690))
148
+ => builtin_clone_impls;
145
149
) ;
146
150
147
151
impl From < RustTarget > for RustFeatures {
@@ -152,6 +156,10 @@ impl From<RustTarget> for RustFeatures {
152
156
features. untagged_union = true ;
153
157
}
154
158
159
+ if rust_target >= RustTarget :: Stable_1_21 {
160
+ features. builtin_clone_impls = true ;
161
+ }
162
+
155
163
if rust_target >= RustTarget :: Nightly {
156
164
features. const_fn = true ;
157
165
features. thiscall_abi = true ;
@@ -183,6 +191,7 @@ mod test {
183
191
fn str_to_target ( ) {
184
192
test_target ( "1.0" , RustTarget :: Stable_1_0 ) ;
185
193
test_target ( "1.19" , RustTarget :: Stable_1_19 ) ;
194
+ test_target ( "1.21" , RustTarget :: Stable_1_21 ) ;
186
195
test_target ( "nightly" , RustTarget :: Nightly ) ;
187
196
}
188
197
}
0 commit comments