@@ -91,24 +91,36 @@ macro_rules! rust_target_base {
91
91
/// Rust stable 1.1
92
92
=> Stable_1_1 => 1.1 ;
93
93
/// Rust stable 1.19
94
+ /// * Untagged unions ([RFC 1444](https://github.com/rust-lang/rfcs/blob/master/text/1444-union.md))
94
95
=> Stable_1_19 => 1.19 ;
95
96
/// Rust stable 1.20
97
+ /// * Associated constants ([PR](https://github.com/rust-lang/rust/pull/42809))
96
98
=> Stable_1_20 => 1.20 ;
97
99
/// Rust stable 1.21
100
+ /// * Builtin impls for `Clone` ([PR](https://github.com/rust-lang/rust/pull/43690))
98
101
=> Stable_1_21 => 1.21 ;
99
102
/// Rust stable 1.25
103
+ /// * `repr(align)` ([PR](https://github.com/rust-lang/rust/pull/47006))
100
104
=> Stable_1_25 => 1.25 ;
101
105
/// Rust stable 1.26
106
+ /// * [i128 / u128 support](https://doc.rust-lang.org/std/primitive.i128.html)
102
107
=> Stable_1_26 => 1.26 ;
103
108
/// Rust stable 1.27
109
+ /// * `must_use` attribute on functions ([PR](https://github.com/rust-lang/rust/pull/48925))
104
110
=> Stable_1_27 => 1.27 ;
105
111
/// Rust stable 1.28
112
+ /// * `repr(transparent)` ([PR](https://github.com/rust-lang/rust/pull/51562))
106
113
=> Stable_1_28 => 1.28 ;
107
114
/// Rust stable 1.30
115
+ /// * `const fn` support for limited cases ([PR](https://github.com/rust-lang/rust/pull/54835/)
116
+ /// * [c_void available in core](https://doc.rust-lang.org/core/ffi/enum.c_void.html)
108
117
=> Stable_1_30 => 1.30 ;
109
118
/// Rust stable 1.33
119
+ /// * repr(packed(N)) ([PR](https://github.com/rust-lang/rust/pull/57049))
110
120
=> Stable_1_33 => 1.33 ;
111
121
/// Nightly rust
122
+ /// * `thiscall` calling convention ([Tracking issue](https://github.com/rust-lang/rust/issues/42202))
123
+ /// * `non_exhaustive` enums/structs ([Tracking issue](https://github.com/rust-lang/rust/issues/44109))
112
124
=> Nightly => nightly;
113
125
) ;
114
126
}
@@ -129,7 +141,8 @@ macro_rules! rust_feature_def {
129
141
) => {
130
142
/// Features supported by a rust target
131
143
#[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash ) ]
132
- pub struct RustFeatures {
144
+ #[ allow( missing_docs) ] // Documentation should go into the relevant variants.
145
+ pub ( crate ) struct RustFeatures {
133
146
$( $(
134
147
$(
135
148
#[ $attr]
@@ -167,50 +180,40 @@ macro_rules! rust_feature_def {
167
180
}
168
181
}
169
182
183
+ // NOTE(emilio): When adding or removing features here, make sure to update the
184
+ // documentation for the relevant variant in the rust_target_base macro
185
+ // definition.
170
186
rust_feature_def ! (
171
187
Stable_1_19 {
172
- /// Untagged unions ([RFC 1444](https://github.com/rust-lang/rfcs/blob/master/text/1444-union.md))
173
188
=> untagged_union;
174
189
}
175
190
Stable_1_20 {
176
- /// associated constants ([PR](https://github.com/rust-lang/rust/pull/42809))
177
191
=> associated_const;
178
192
}
179
193
Stable_1_21 {
180
- /// builtin impls for `Clone` ([PR](https://github.com/rust-lang/rust/pull/43690))
181
194
=> builtin_clone_impls;
182
195
}
183
196
Stable_1_25 {
184
- /// repr(align) ([PR](https://github.com/rust-lang/rust/pull/47006))
185
197
=> repr_align;
186
198
}
187
199
Stable_1_26 {
188
- /// [i128 / u128 support](https://doc.rust-lang.org/std/primitive.i128.html)
189
200
=> i128_and_u128;
190
201
}
191
202
Stable_1_27 {
192
- /// `must_use` attribute on functions ([PR](https://github.com/rust-lang/rust/pull/48925))
193
203
=> must_use_function;
194
204
}
195
205
Stable_1_28 {
196
- /// repr(transparent) ([PR](https://github.com/rust-lang/rust/pull/51562))
197
206
=> repr_transparent;
198
207
}
199
208
Stable_1_30 {
200
- /// `const fn` support for limited cases
201
- /// ([PR](https://github.com/rust-lang/rust/pull/54835/)
202
209
=> min_const_fn;
203
- /// [c_void available in core](https://doc.rust-lang.org/core/ffi/enum.c_void.html)
204
210
=> core_ffi_c_void;
205
211
}
206
212
Stable_1_33 {
207
- /// repr(packed(N)) ([PR](https://github.com/rust-lang/rust/pull/57049))
208
213
=> repr_packed_n;
209
214
}
210
215
Nightly {
211
- /// `thiscall` calling convention ([Tracking issue](https://github.com/rust-lang/rust/issues/42202))
212
216
=> thiscall_abi;
213
- /// `non_exhaustive` enums/structs ([Tracking issue](https://github.com/rust-lang/rust/issues/44109))
214
217
=> non_exhaustive;
215
218
}
216
219
) ;
0 commit comments