about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-07-01 20:29:56 +0200
committerGitHub <noreply@github.com>2024-07-01 20:29:56 +0200
commitc4baa3f2f470596a45ebe112cae26ca5a8fae792 (patch)
tree9ac97815e52b9e17f4739814a5540289d691c7f0 /src
parent61db24d15d9dff2576561abaad58b77aadb2764f (diff)
parent1031d4da55e9e4f96ace279281530bc8914472c4 (diff)
downloadrust-c4baa3f2f470596a45ebe112cae26ca5a8fae792.tar.gz
rust-c4baa3f2f470596a45ebe112cae26ca5a8fae792.zip
Rollup merge of #126753 - compiler-errors:use-style-guide, r=joshtriplett,calebcartwright
Add nightly style guide section for `precise_capturing` `use<>` syntax

r? style

Tracking:

- https://github.com/rust-lang/rust/issues/123432
Diffstat (limited to 'src')
-rw-r--r--src/doc/style-guide/src/nightly.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/doc/style-guide/src/nightly.md b/src/doc/style-guide/src/nightly.md
index 66e7fa3c9f8..d870edf1888 100644
--- a/src/doc/style-guide/src/nightly.md
+++ b/src/doc/style-guide/src/nightly.md
@@ -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> {}
+```