Skip to content

Commit ae955a8

Browse files
pnkfelixteor2345digama0
authored
Apply suggestions from code review
Co-authored-by: teor <[email protected]> Co-authored-by: Mario Carneiro <[email protected]>
1 parent 9c95e15 commit ae955a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

text/3399-cfg-attribute-in-where.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ functionality already exists in the language, but quickly grows out of reasonabl
6969
# Guide-level explanation
7070
[guide-level-explanation]: #guide-level-explanation
7171

72-
Where clauses can use cfg-attributes on individual bounds, like so:
72+
`where` clauses can use cfg-attributes on individual trait bounds, like so:
7373

7474
```rust
7575
impl<T> SomeTrait<T> for Thing
@@ -90,7 +90,7 @@ where
9090
T: SomeRequirementB,
9191
{}
9292
```
93-
and in other situations where where clauses apply.
93+
and in other situations where `where` clauses apply.
9494

9595
During compilation, all cfg-attributes on a where bound are evaluated. If the evaluation result is false, then the bound in question is not
9696
compiled and the bound does not apply to the given type. This may cause errors if code that relies on those bounds is not itself also
@@ -101,8 +101,8 @@ fields or on function signatures.
101101
[reference-level-explanation]: #reference-level-explanation
102102

103103
In positions that accept where clauses, such as trait implementations and function signatures, individual clauses can now be decorated with
104-
cfg-attributes. The cfg-attribute must be on the left hand of the colon (e.g. `#[cfg(...]) T: Foo` rather than `T: #[cfg(...)] Foo`) and
105-
apply for that one bound, up to the comma or end of the where section. Each bound collection will be conditionally compiled depending on the
104+
cfg-attributes. The cfg-attribute must be on the left hand of the colon (e.g. `#[cfg(...)] T: Foo` rather than `T: #[cfg(...)] Foo`) and
105+
applies to that one bound, up to the comma or end of the where section. Each bound collection will be conditionally compiled depending on the
106106
conditions specified in the cfg arguments. Note that this may cause a where clause to conditionally compile as having no bound entries
107107
(i.e. an empty where clause), but this has been allowed in Rust since 1.16 and already occurs from time to time when using macros.
108108

0 commit comments

Comments
 (0)