Skip to content

Commit

Permalink
Rollup merge of rust-lang#126753 - compiler-errors:use-style-guide, r…
Browse files Browse the repository at this point in the history
…=joshtriplett,calebcartwright

Add nightly style guide section for `precise_capturing` `use<>` syntax

r? style

Tracking:

- rust-lang#123432
  • Loading branch information
GuillaumeGomez authored Jul 1, 2024
2 parents c3774be + 1031d4d commit 9ab1ea0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/doc/style-guide/src/nightly.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,15 @@ This chapter documents style and formatting for nightly-only syntax. The rest of
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.

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.

### `feature(precise_capturing)`

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`.

```
fn foo() -> impl Sized + use<'a> {}
// is formatted analogously to:
fn foo() -> impl Sized + Use<'a> {}
```

0 comments on commit 9ab1ea0

Please sign in to comment.