Skip to content

format examples better #471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions src/implementing_new_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,26 +125,26 @@ a new unstable feature:
2. Pick a name for the feature gate (for RFCs, use the name
in the RFC).

3. Add a feature gate declaration to `libsyntax/active.rs`
3. Add a feature gate declaration to `libsyntax/feature_gate/active.rs`
in the active `declare_features` block:

```rust,ignore
// description of feature
(active, $feature_name, "$current_nightly_version", Some($tracking_issue_number), $edition)
```
```rust,ignore
// description of feature
(active, $feature_name, "$current_nightly_version", Some($tracking_issue_number), $edition)
```

where `$edition` has the type `Option<Edition>`, and is typically
just `None`.
where `$edition` has the type `Option<Edition>`, and is typically
just `None`.

For example:
For example:

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

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

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