From 02085271d6ce94dcf8745f01f4076f13702e27f7 Mon Sep 17 00:00:00 2001
From: Noratrieb <48135649+Noratrieb@users.noreply.github.com>
Date: Sun, 4 May 2025 10:59:06 +0200
Subject: [PATCH 1/2] Make disclaimer about this not being guarantees a lot
more visible
People continue to miss it, and the old disclaimer is easily overlooked
when skimming. Make sure that it's more visible.
Additionally, rename all the pages to more clearly say **suggestions**,
making it more visible that those are **not** **guarantees**.
---
reference/src/SUMMARY.md | 14 +++++++-------
reference/src/layout/enums.md | 16 ++++++++--------
reference/src/layout/packed-simd-vectors.md | 11 +++++++----
reference/src/layout/pointers.md | 11 ++++++-----
reference/src/layout/scalars.md | 11 +++++++----
reference/src/layout/structs-and-tuples.md | 11 +++++++----
reference/src/layout/unions.md | 12 ++++++------
7 files changed, 48 insertions(+), 38 deletions(-)
diff --git a/reference/src/SUMMARY.md b/reference/src/SUMMARY.md
index 33dce2b0..83aa07ad 100644
--- a/reference/src/SUMMARY.md
+++ b/reference/src/SUMMARY.md
@@ -2,15 +2,15 @@
- [Introduction](./introduction.md)
- [Glossary](./glossary.md)
-- [Data layout](./layout.md)
- - [Structs and tuples](./layout/structs-and-tuples.md)
- - [Scalars](./layout/scalars.md)
- - [Enums](./layout/enums.md)
- - [Unions](./layout/unions.md)
- - [Pointers](./layout/pointers.md)
+- [Data layout suggestions](./layout.md)
+ - [Structs and tuples layout suggestions](./layout/structs-and-tuples.md)
+ - [Scalar layout suggestions](./layout/scalars.md)
+ - [Enum layout suggestions](./layout/enums.md)
+ - [Union layout suggestions](./layout/unions.md)
+ - [Pointer layout suggestions](./layout/pointers.md)
- [Function pointers](./layout/function-pointers.md)
- [Arrays and Slices](./layout/arrays-and-slices.md)
- - [Packed SIMD vectors](./layout/packed-simd-vectors.md)
+ - [Packed SIMD vectors layout suggestions](./layout/packed-simd-vectors.md)
- [Validity](./validity.md)
- [Unions](./validity/unions.md)
- [Function Pointers](./validity/function-pointers.md)
diff --git a/reference/src/layout/enums.md b/reference/src/layout/enums.md
index 91f466d2..3c28bf89 100644
--- a/reference/src/layout/enums.md
+++ b/reference/src/layout/enums.md
@@ -1,11 +1,11 @@
-# Layout of Rust `enum` types
-
-**Disclaimer:** Some parts of this section were decided in RFCs, but
-others represent the consensus from issue [#10]. The text will attempt
-to clarify which parts are "guaranteed" (owing to the RFC decision)
-and which parts are still in a "preliminary" state, at least until we
-start to open RFCs ratifying parts of the Unsafe Code Guidelines
-effort.
+# Suggested Layout of Rust `enum` types
+
+
+
+This page describes an opinion on what the original unsafe-code-guidelines _wanted_
+layout to be from [#10]. **It does not reflect current or future Rust guarantees**.
+
+
**Note:** This document has not yet been updated to
[RFC 2645](https://github.com/rust-lang/rfcs/blob/master/text/2645-transparent-unions.md).
diff --git a/reference/src/layout/packed-simd-vectors.md b/reference/src/layout/packed-simd-vectors.md
index ed7b871b..6f938901 100644
--- a/reference/src/layout/packed-simd-vectors.md
+++ b/reference/src/layout/packed-simd-vectors.md
@@ -1,8 +1,11 @@
-# Layout of packed SIMD vectors
+# Suggested Layout of packed SIMD vectors
-**Disclaimer:** This chapter represents the consensus from issue
-[#38]. The statements in here are not (yet) "guaranteed"
-not to change until an RFC ratifies them.
+
+
+This page describes an opinion on what the original unsafe-code-guidelines _wanted_
+layout to be from [#38]. **It does not reflect current or future Rust guarantees**.
+
+
[#38]: https://github.com/rust-rfcs/unsafe-code-guidelines/issues/38
diff --git a/reference/src/layout/pointers.md b/reference/src/layout/pointers.md
index b8324ad1..f51f1c57 100644
--- a/reference/src/layout/pointers.md
+++ b/reference/src/layout/pointers.md
@@ -1,10 +1,11 @@
-# Layout of reference and pointer types
+# Suggested Layout of reference and pointer types
-**Disclaimer:** Everything this section says about pointers to dynamically sized
-types represents the consensus from issue [#16], but has not been stabilized
-through an RFC. As such, this is preliminary information.
+
-[#16]: https://github.com/rust-rfcs/unsafe-code-guidelines/issues/16
+This page describes an opinion on what the original unsafe-code-guidelines _wanted_
+layout to be from [#16]. **It does not reflect current or future Rust guarantees**.
+
+
### Terminology
diff --git a/reference/src/layout/scalars.md b/reference/src/layout/scalars.md
index babb4f46..7a7b572f 100644
--- a/reference/src/layout/scalars.md
+++ b/reference/src/layout/scalars.md
@@ -1,8 +1,11 @@
-# Layout of scalar types
+# Suggested Layout of scalar types
-**Disclaimer:** This chapter represents the consensus from issue
-[#9]. The statements in here are not (yet) "guaranteed"
-not to change until an RFC ratifies them.
+
+
+This page describes an opinion on what the original unsafe-code-guidelines _wanted_
+layout to be from [#9]. **It does not reflect current or future Rust guarantees**.
+
+
This documents the memory layout and considerations for `bool`, `char`, floating
point types (`f{32, 64}`), and integral types (`{i,u}{8,16,32,64,128,size}`).
diff --git a/reference/src/layout/structs-and-tuples.md b/reference/src/layout/structs-and-tuples.md
index e94d2c6e..677ce8c6 100644
--- a/reference/src/layout/structs-and-tuples.md
+++ b/reference/src/layout/structs-and-tuples.md
@@ -1,8 +1,11 @@
-# Layout of structs and tuples
+# Suggested Layout of structs and tuples
-**Disclaimer:** This chapter represents the consensus from issues
-[#11] and [#12]. The statements in here are not (yet) "guaranteed"
-not to change until an RFC ratifies them.
+
+
+This page describes an opinion on what the original unsafe-code-guidelines _wanted_
+layout to be from [#11] and [#12]. **It does not reflect current or future Rust guarantees**.
+
+
[#11]: https://github.com/rust-rfcs/unsafe-code-guidelines/issues/11
[#12]: https://github.com/rust-rfcs/unsafe-code-guidelines/issues/12
diff --git a/reference/src/layout/unions.md b/reference/src/layout/unions.md
index 42d55ee7..a25370bd 100644
--- a/reference/src/layout/unions.md
+++ b/reference/src/layout/unions.md
@@ -1,11 +1,11 @@
-# Layout of unions
+# Suggested Layout of unions
-**Disclaimer:** This chapter represents the consensus from issue
-[#13]. The statements in here are not (yet) "guaranteed"
-not to change until an RFC ratifies them.
+
-**Note:** This document has not yet been updated to
-[RFC 2645](https://github.com/rust-lang/rfcs/blob/master/text/2645-transparent-unions.md).
+This page describes an opinion on what the original unsafe-code-guidelines _wanted_
+layout to be from [#13]. **It does not reflect current or future Rust guarantees**.
+
+
[#13]: https://github.com/rust-rfcs/unsafe-code-guidelines/issues/13
From 5d8a63a3acb69a42a510ae3bfbf92753b2d3fd3f Mon Sep 17 00:00:00 2001
From: Noratrieb <48135649+Noratrieb@users.noreply.github.com>
Date: Sun, 4 May 2025 11:08:39 +0200
Subject: [PATCH 2/2] update actions/upload-pages-artifact
---
.github/workflows/deploy.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index c580d59e..43913835 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -24,7 +24,7 @@ jobs:
mdbook build
mdbook test
- name: Upload Artifact
- uses: actions/upload-pages-artifact@v1.0.8
+ uses: actions/upload-pages-artifact@v3.0.1
with:
path: reference/book