Skip to content

add safety comments section to top level summary #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MDBOOK_VERSION=0.4.8
MDBOOK_VERSION=0.4.18
MDBOOK_LINKCHECK_VERSION=0.7.4
MDBOOK_TOC_VERSION=0.6.3

Expand Down
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

- [Documentation](./documentation/summary.md)
- [doc alias policy](./documentation/doc-alias-policy.md)
- [safety comments policy](./documentation/safety-comments.md)

---

Expand Down
4 changes: 2 additions & 2 deletions src/documentation/safety-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ lint for `# Safety` sections by the way.

[See the example on github][as_bytes_mut]

```rust
```rust,ignore
/// Converts a mutable string slice to a mutable byte slice.
///
/// # Safety
Expand Down Expand Up @@ -64,7 +64,7 @@ not check for `0` before dividing.

[See the example on github][split_at]

```rust
```rust,ignore
pub fn split_at(&self, mid: usize) -> (&str, &str) {
// is_char_boundary checks that the index is in [0, .len()]
if self.is_char_boundary(mid) {
Expand Down