Skip to content

Commit 9ab1ea0

Browse files
Rollup merge of rust-lang#126753 - compiler-errors:use-style-guide, r=joshtriplett,calebcartwright
Add nightly style guide section for `precise_capturing` `use<>` syntax r? style Tracking: - rust-lang#123432
2 parents c3774be + 1031d4d commit 9ab1ea0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

+12
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,15 @@ 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+
```

0 commit comments

Comments
 (0)