Skip to content

Commit 6dd33b4

Browse files
committed
Rollup merge of #26603 - Gankro:ref, r=steveklabnik
Quick poll of basically the entire core team says this is ok.
2 parents 0bf0ea3 + 9001da6 commit 6dd33b4

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Diff for: src/doc/reference.md

-3
Original file line numberDiff line numberDiff line change
@@ -1047,11 +1047,8 @@ This is a list of behavior not considered *unsafe* in Rust terms, but that may
10471047
be undesired.
10481048

10491049
* Deadlocks
1050-
* Reading data from private fields (`std::repr`)
10511050
* Leaks of memory and other resources
10521051
* Exiting without calling destructors
1053-
* Sending signals
1054-
* Accessing/modifying the file system
10551052
* Integer overflow
10561053
- Overflow is considered "unexpected" behavior and is always user-error,
10571054
unless the `wrapping` primitives are used. In non-optimized builds, the compiler

Diff for: src/doc/trpl/unsafe.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ two contexts. The first one is to mark a function as unsafe:
1212

1313
```rust
1414
unsafe fn danger_will_robinson() {
15-
// scary stuff
15+
// scary stuff
1616
}
1717
```
1818

@@ -68,11 +68,8 @@ Whew! That’s a bunch of stuff. It’s also important to notice all kinds of
6868
behaviors that are certainly bad, but are expressly _not_ unsafe:
6969

7070
* Deadlocks
71-
* Reading data from private fields
72-
* Leaks due to reference count cycles
71+
* Leaks of memory or other resources
7372
* Exiting without calling destructors
74-
* Sending signals
75-
* Accessing/modifying the file system
7673
* Integer overflow
7774

7875
Rust cannot prevent all kinds of software problems. Buggy code can and will be

0 commit comments

Comments
 (0)