Skip to content

Commit 0208527

Browse files
committed
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**.
1 parent f572fa7 commit 0208527

File tree

7 files changed

+48
-38
lines changed

7 files changed

+48
-38
lines changed

reference/src/SUMMARY.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
- [Introduction](./introduction.md)
44
- [Glossary](./glossary.md)
5-
- [Data layout](./layout.md)
6-
- [Structs and tuples](./layout/structs-and-tuples.md)
7-
- [Scalars](./layout/scalars.md)
8-
- [Enums](./layout/enums.md)
9-
- [Unions](./layout/unions.md)
10-
- [Pointers](./layout/pointers.md)
5+
- [Data layout suggestions](./layout.md)
6+
- [Structs and tuples layout suggestions](./layout/structs-and-tuples.md)
7+
- [Scalar layout suggestions](./layout/scalars.md)
8+
- [Enum layout suggestions](./layout/enums.md)
9+
- [Union layout suggestions](./layout/unions.md)
10+
- [Pointer layout suggestions](./layout/pointers.md)
1111
- [Function pointers](./layout/function-pointers.md)
1212
- [Arrays and Slices](./layout/arrays-and-slices.md)
13-
- [Packed SIMD vectors](./layout/packed-simd-vectors.md)
13+
- [Packed SIMD vectors layout suggestions](./layout/packed-simd-vectors.md)
1414
- [Validity](./validity.md)
1515
- [Unions](./validity/unions.md)
1616
- [Function Pointers](./validity/function-pointers.md)

reference/src/layout/enums.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Layout of Rust `enum` types
2-
3-
**Disclaimer:** Some parts of this section were decided in RFCs, but
4-
others represent the consensus from issue [#10]. The text will attempt
5-
to clarify which parts are "guaranteed" (owing to the RFC decision)
6-
and which parts are still in a "preliminary" state, at least until we
7-
start to open RFCs ratifying parts of the Unsafe Code Guidelines
8-
effort.
1+
# Suggested Layout of Rust `enum` types
2+
3+
<div class="warning">
4+
5+
This page describes an opinion on what the original unsafe-code-guidelines _wanted_
6+
layout to be from [#10]. **It does not reflect current or future Rust guarantees**.
7+
8+
</div>
99

1010
**Note:** This document has not yet been updated to
1111
[RFC 2645](https://github.com/rust-lang/rfcs/blob/master/text/2645-transparent-unions.md).

reference/src/layout/packed-simd-vectors.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Layout of packed SIMD vectors
1+
# Suggested Layout of packed SIMD vectors
22

3-
**Disclaimer:** This chapter represents the consensus from issue
4-
[#38]. The statements in here are not (yet) "guaranteed"
5-
not to change until an RFC ratifies them.
3+
<div class="warning">
4+
5+
This page describes an opinion on what the original unsafe-code-guidelines _wanted_
6+
layout to be from [#38]. **It does not reflect current or future Rust guarantees**.
7+
8+
</div>
69

710
[#38]: https://github.com/rust-rfcs/unsafe-code-guidelines/issues/38
811

reference/src/layout/pointers.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
# Layout of reference and pointer types
1+
# Suggested Layout of reference and pointer types
22

3-
**Disclaimer:** Everything this section says about pointers to dynamically sized
4-
types represents the consensus from issue [#16], but has not been stabilized
5-
through an RFC. As such, this is preliminary information.
3+
<div class="warning">
64

7-
[#16]: https://github.com/rust-rfcs/unsafe-code-guidelines/issues/16
5+
This page describes an opinion on what the original unsafe-code-guidelines _wanted_
6+
layout to be from [#16]. **It does not reflect current or future Rust guarantees**.
7+
8+
</div>
89

910
### Terminology
1011

reference/src/layout/scalars.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Layout of scalar types
1+
# Suggested Layout of scalar types
22

3-
**Disclaimer:** This chapter represents the consensus from issue
4-
[#9]. The statements in here are not (yet) "guaranteed"
5-
not to change until an RFC ratifies them.
3+
<div class="warning">
4+
5+
This page describes an opinion on what the original unsafe-code-guidelines _wanted_
6+
layout to be from [#9]. **It does not reflect current or future Rust guarantees**.
7+
8+
</div>
69

710
This documents the memory layout and considerations for `bool`, `char`, floating
811
point types (`f{32, 64}`), and integral types (`{i,u}{8,16,32,64,128,size}`).

reference/src/layout/structs-and-tuples.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Layout of structs and tuples
1+
# Suggested Layout of structs and tuples
22

3-
**Disclaimer:** This chapter represents the consensus from issues
4-
[#11] and [#12]. The statements in here are not (yet) "guaranteed"
5-
not to change until an RFC ratifies them.
3+
<div class="warning">
4+
5+
This page describes an opinion on what the original unsafe-code-guidelines _wanted_
6+
layout to be from [#11] and [#12]. **It does not reflect current or future Rust guarantees**.
7+
8+
</div>
69

710
[#11]: https://github.com/rust-rfcs/unsafe-code-guidelines/issues/11
811
[#12]: https://github.com/rust-rfcs/unsafe-code-guidelines/issues/12

reference/src/layout/unions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Layout of unions
1+
# Suggested Layout of unions
22

3-
**Disclaimer:** This chapter represents the consensus from issue
4-
[#13]. The statements in here are not (yet) "guaranteed"
5-
not to change until an RFC ratifies them.
3+
<div class="warning">
64

7-
**Note:** This document has not yet been updated to
8-
[RFC 2645](https://github.com/rust-lang/rfcs/blob/master/text/2645-transparent-unions.md).
5+
This page describes an opinion on what the original unsafe-code-guidelines _wanted_
6+
layout to be from [#13]. **It does not reflect current or future Rust guarantees**.
7+
8+
</div>
99

1010
[#13]: https://github.com/rust-rfcs/unsafe-code-guidelines/issues/13
1111

0 commit comments

Comments
 (0)