You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "general" suffix seemed too generic to me, and also didn't quite fit
with some of the style in the rest of the grammar.
Some of these are difficult to come up with good names for, and I'm
not entirely happy with this. My thinking is:
- `.intro` is for informative introductions to a section. My intention
is that every normative rule is testable. However, many of these
`.intro` rules define terms, and I think those should possibly be
normative (like [ISO/IEC
Directives](https://www.iso.org/sites/directives/current/part2/index.xhtml#_idTextAnchor212)).
I would like to rethink how `.intro` works. I appreciate having
introductions that are more generalized, but it is often very
difficult to introduce a section without defining some terms first.
I would also like to come up with a better strategy of "this is a
testable rule" versus "this rule defines a term, but that by isn't
testable".
- Switched some of these to be more specific words tailored to their
context.
- Used `.def` for some of these that *define* a thing. `.def` is used in
a variety of other places. We have not standardized on it, and I'm not
sure it is working in a way that is clear (is it defining a term?
behavior? rule? general principle?).
I think this is being used in ways that are inconsistent, and would
like to figure out something better.
*Conditionally compiled source code* is source code that is compiled only under certain conditions.
32
32
33
33
r[cfg.attributes-macro]
@@ -72,7 +72,7 @@ Keys do not need to be unique. For example, both `feature = "std"` and `feature
72
72
r[cfg.options.set]
73
73
## Set configuration options
74
74
75
-
r[cfg.options.general]
75
+
r[cfg.options.intro]
76
76
Which configuration options are set is determined statically during the compilation of the crate.
77
77
78
78
r[cfg.options.target]
@@ -93,7 +93,7 @@ It is not possible to set a configuration option from within the source code of
93
93
r[cfg.target_arch]
94
94
### `target_arch`
95
95
96
-
r[cfg.target_arch.gen]
96
+
r[cfg.target_arch.def]
97
97
Key-value option set once with the target's CPU architecture. The value is similar to the first element of the platform's target triple, but not identical.
98
98
99
99
r[cfg.target_arch.values]
@@ -110,7 +110,7 @@ Example values:
110
110
r[cfg.target_feature]
111
111
### `target_feature`
112
112
113
-
r[cfg.target_feature.general]
113
+
r[cfg.target_feature.def]
114
114
Key-value option set for each platform feature available for the current compilation target.
115
115
116
116
r[cfg.target_feature.values]
@@ -132,7 +132,7 @@ An additional feature of `crt-static` is available to the `target_feature` optio
132
132
r[cfg.target_os]
133
133
### `target_os`
134
134
135
-
r[cfg.target_os.general]
135
+
r[cfg.target_os.def]
136
136
Key-value option set once with the target's operating system. This value is similar to the second and third element of the platform's target triple.
137
137
138
138
r[cfg.target_os.values]
@@ -152,7 +152,7 @@ Example values:
152
152
r[cfg.target_family]
153
153
### `target_family`
154
154
155
-
r[cfg.target_family.general]
155
+
r[cfg.target_family.def]
156
156
Key-value option providing a more generic description of a target, such as the family of the operating systems or architectures that the target generally falls into. Any number of `target_family` key-value pairs can be set.
157
157
158
158
r[cfg.target_family.values]
@@ -174,7 +174,7 @@ r[cfg.target_family.windows]
174
174
r[cfg.target_env]
175
175
### `target_env`
176
176
177
-
r[cfg.target_env.general]
177
+
r[cfg.target_env.def]
178
178
Key-value option set with further disambiguating information about the target platform with information about the ABI or `libc` used. For historical reasons, this value is only defined as not the empty-string when actually needed for disambiguation. Thus, for example, on many GNU platforms, this value will be empty. This value is similar to the fourth element of the platform's target triple. One difference is that embedded ABIs such as `gnueabihf` will simply define `target_env` as `"gnu"`.
179
179
180
180
r[cfg.target_env.values]
@@ -191,7 +191,7 @@ Example values:
191
191
r[cfg.target_abi]
192
192
### `target_abi`
193
193
194
-
r[cfg.target_abi.general]
194
+
r[cfg.target_abi.def]
195
195
Key-value option set to further disambiguate the target with information about the target ABI.
196
196
197
197
r[cfg.target_abi.disambiguation]
@@ -213,7 +213,7 @@ Key-value option set once with either a value of "little" or "big" depending on
213
213
r[cfg.target_pointer_width]
214
214
### `target_pointer_width`
215
215
216
-
r[cfg.target_pointer_width.general]
216
+
r[cfg.target_pointer_width.def]
217
217
Key-value option set once with the target's pointer width in bits.
218
218
219
219
r[cfg.target_pointer_width.values]
@@ -226,7 +226,7 @@ Example values:
226
226
r[cfg.target_vendor]
227
227
### `target_vendor`
228
228
229
-
r[cfg.target_vendor.general]
229
+
r[cfg.target_vendor.def]
230
230
Key-value option set once with the vendor of the target.
231
231
232
232
r[cfg.target_vendor.values]
@@ -240,7 +240,7 @@ Example values:
240
240
r[cfg.target_has_atomic]
241
241
### `target_has_atomic`
242
242
243
-
r[cfg.target_has_atomic.general]
243
+
r[cfg.target_has_atomic.def]
244
244
Key-value option set for each bit width that the target supports atomic loads, stores, and compare-and-swap operations.
245
245
246
246
r[cfg.target_has_atomic.stdlib]
@@ -274,7 +274,7 @@ Set when the crate being compiled is being compiled with the `proc_macro` [crate
274
274
r[cfg.panic]
275
275
### `panic`
276
276
277
-
r[cfg.panic.general]
277
+
r[cfg.panic.def]
278
278
Key-value option set depending on the [panic strategy]. Note that more values may be added in the future.
Copy file name to clipboardExpand all lines: src/const_eval.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
r[const-eval]
2
2
# Constant evaluation
3
3
4
-
r[const-eval.general]
4
+
r[const-eval.intro]
5
5
Constant evaluation is the process of computing the result of [expressions] during compilation. Only a subset of all expressions can be evaluated at compile-time.
6
6
7
7
r[const-eval.const-expr]
8
8
## Constant expressions
9
9
10
-
r[const-eval.const-expr.general]
10
+
r[const-eval.const-expr.intro]
11
11
Certain forms of expressions, called constant expressions, can be evaluated at compile time.
Copy file name to clipboardExpand all lines: src/items/implementations.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -180,7 +180,7 @@ An orphan implementation is one that implements a foreign trait for a foreign ty
180
180
181
181
The orphan rule enables library authors to add new implementations to their traits without fear that they'll break downstream code. Without these restrictions, a library couldn't add an implementation like `impl<T: Display> MyTrait for T` without potentially conflicting with downstream implementations.
182
182
183
-
r[items.impl.trait.orphan-rule.general]
183
+
r[items.impl.trait.orphan-rule.def]
184
184
Given `impl<P1..=Pn> Trait<T1..=Tn> for T0`, an `impl` is valid only if at
0 commit comments