Skip to content

Commit 3bdc990

Browse files
authored
Merge pull request #55 from SimonSapin/unique
Merge 'master' into 'rust-pr-46952'
2 parents 03697eb + fec3182 commit 3bdc990

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/working-with-unsafe.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ capacity violates the invariants of Vec (that `cap` reflects the allocated space
9292
in the Vec). This is not something the rest of Vec can guard against. It *has*
9393
to trust the capacity field because there's no way to verify it.
9494

95-
`unsafe` does more than pollute a whole function: it pollutes a whole *module*.
95+
Because it relies on invariants of a struct field, this `unsafe` code
96+
does more than pollute a whole function: it pollutes a whole *module*.
9697
Generally, the only bullet-proof way to limit the scope of unsafe code is at the
9798
module boundary with privacy.
9899

0 commit comments

Comments
 (0)