Skip to content

Commit d396619

Browse files
Rollup merge of #139518 - xizheyin:issue-138527, r=traviscross
Stabilize precise capture syntax in style guide Closes #138527 r? `@jieyouxu`
2 parents 891b852 + b840942 commit d396619

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/doc/style-guide/src/nightly.md

-12
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,3 @@ This chapter documents style and formatting for nightly-only syntax. The rest of
55
Style and formatting for nightly-only syntax should be removed from this chapter and integrated into the appropriate sections of the style guide at the time of stabilization.
66

77
There is no guarantee of the stability of this chapter in contrast to the rest of the style guide. Refer to the style team policy for nightly formatting procedure regarding breaking changes to this chapter.
8-
9-
### `feature(precise_capturing)`
10-
11-
A `use<'a, T>` precise capturing bound is formatted as if it were a single path segment with non-turbofished angle-bracketed args, like a trait bound whose identifier is `use`.
12-
13-
```
14-
fn foo() -> impl Sized + use<'a> {}
15-
16-
// is formatted analogously to:
17-
18-
fn foo() -> impl Sized + Use<'a> {}
19-
```

src/doc/style-guide/src/types.md

+12
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,15 @@ Box<
5959
+ Debug
6060
>
6161
```
62+
63+
## Precise capturing bounds
64+
65+
A `use<'a, T>` precise capturing bound is formatted as if it were a single path segment with non-turbofished angle-bracketed args, like a trait bound whose identifier is `use`.
66+
67+
```rust
68+
fn foo() -> impl Sized + use<'a> {}
69+
70+
// is formatted analogously to:
71+
72+
fn foo() -> impl Sized + Use<'a> {}
73+
```

0 commit comments

Comments
 (0)