Skip to content

Commit 232b35d

Browse files
tshepangspastorino
authored andcommitted
format examples better (#471)
1 parent 4e87eb2 commit 232b35d

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/implementing_new_features.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -125,26 +125,26 @@ a new unstable feature:
125125
2. Pick a name for the feature gate (for RFCs, use the name
126126
in the RFC).
127127

128-
3. Add a feature gate declaration to `libsyntax/active.rs`
128+
3. Add a feature gate declaration to `libsyntax/feature_gate/active.rs`
129129
in the active `declare_features` block:
130130

131-
```rust,ignore
132-
// description of feature
133-
(active, $feature_name, "$current_nightly_version", Some($tracking_issue_number), $edition)
134-
```
131+
```rust,ignore
132+
// description of feature
133+
(active, $feature_name, "$current_nightly_version", Some($tracking_issue_number), $edition)
134+
```
135135

136-
where `$edition` has the type `Option<Edition>`, and is typically
137-
just `None`.
136+
where `$edition` has the type `Option<Edition>`, and is typically
137+
just `None`.
138138

139-
For example:
139+
For example:
140140

141-
```rust,ignore
142-
// allow '|' at beginning of match arms (RFC 1925)
143-
( active, match_beginning_vert, "1.21.0", Some(44101), None),
144-
```
141+
```rust,ignore
142+
/// Allows defining identifiers beyond ASCII.
143+
(active, non_ascii_idents, "1.0.0", Some(55467), None),
144+
```
145145

146-
When added, the current version should be the one for the current nightly.
147-
Once the feature is moved to `accepted.rs`, the version is changed to that nightly version.
146+
When added, the current version should be the one for the current nightly.
147+
Once the feature is moved to `accepted.rs`, the version is changed to that nightly version.
148148

149149
4. Prevent usage of the new feature unless the feature gate is set.
150150
You can check it in most places in the compiler using the

0 commit comments

Comments
 (0)