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 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 + +<div class="warning"> + +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**. + +</div> **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. +<div class="warning"> + +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**. + +</div> [#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. +<div class="warning"> -[#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**. + +</div> ### 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. +<div class="warning"> + +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**. + +</div> 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. +<div class="warning"> + +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**. + +</div> [#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. +<div class="warning"> -**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**. + +</div> [#13]: https://github.com/rust-rfcs/unsafe-code-guidelines/issues/13