about summary refs log tree commit diff
diff options
context:
space:
mode:
authorfee1-dead <ent3rm4n@gmail.com>2023-07-06 09:20:30 +0800
committerGitHub <noreply@github.com>2023-07-06 09:20:30 +0800
commit6e9bdacaf9ec183df9c3027c33775fee868f8435 (patch)
tree27a40edd2b328022b496dd60a83efb20529c266b
parentd9c13cd4531649c2028a8384cb4d4e54f985380e (diff)
parent5957f028a1019f306b131299e6e653d942f809e9 (diff)
downloadrust-6e9bdacaf9ec183df9c3027c33775fee868f8435.tar.gz
rust-6e9bdacaf9ec183df9c3027c33775fee868f8435.zip
Rollup merge of #111119 - compiler-errors:style-nightly, r=joshtriplett
style-guide: Add chapter about formatting for nightly-only syntax

cc `@rust-lang/style`

nightly policy mentioned below is being proposed in https://github.com/rust-lang/style-team/pull/180
-rw-r--r--src/doc/style-guide/src/SUMMARY.md1
-rw-r--r--src/doc/style-guide/src/nightly.md5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/doc/style-guide/src/SUMMARY.md b/src/doc/style-guide/src/SUMMARY.md
index 59fe9fdc669..606485bfb6c 100644
--- a/src/doc/style-guide/src/SUMMARY.md
+++ b/src/doc/style-guide/src/SUMMARY.md
@@ -9,3 +9,4 @@
 - [Other style advice](advice.md)
 - [`Cargo.toml` conventions](cargo.md)
 - [Guiding principles and rationale](principles.md)
+- [Nightly-only syntax](nightly.md)
diff --git a/src/doc/style-guide/src/nightly.md b/src/doc/style-guide/src/nightly.md
new file mode 100644
index 00000000000..031811b0e6f
--- /dev/null
+++ b/src/doc/style-guide/src/nightly.md
@@ -0,0 +1,5 @@
+This chapter documents style and formatting for nightly-only syntax. The rest of the style guide documents style for stable Rust syntax; nightly syntax only appears in this chapter. Each section here includes the name of the feature gate, so that searches (e.g. `git grep`) for a nightly feature in the Rust repository also turn up the style guide section.
+
+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.