@@ -218,25 +218,25 @@ Cross-referencing to other discussions:
218
218
* < https://github.com/rust-lang/rust/issues/17027 >
219
219
* < https://github.com/rust-lang/unsafe-code-guidelines/issues/176 >
220
220
221
- ## A way to bypass visibility, including a ` unsafe ` bypass
221
+ ## A way to bypass visibility, including an ` unsafe ` bypass
222
222
223
- Items are only accessible if they are marked ` pub ` or re-exported as such,
223
+ Items are only accessible if they are marked ` pub ` or re-exported as such;
224
224
they are otherwise private by default. People sometimes wish to break that
225
225
rule to access internals of libraries they're using, for example to access
226
226
private fields of a type or to call private functions.
227
227
228
- This could break invariants assumed by the crate's author, which if any
229
- unsafe code depends on those could lead to undefined behavior.
228
+ This could break invariants assumed by the crate's author, which, if any
229
+ unsafe code depends on those, could lead to undefined behavior.
230
230
231
- More importantly, allowing people to violate privacy would destroy semver .
231
+ More importantly, allowing people to violate privacy would destroy SemVer .
232
232
If people can access and use implementation details of other crates then
233
233
that means that almost any change is now a breaking change. This would lead
234
234
to widespread fallout across the crate ecosystem.
235
235
236
236
Making it ` unsafe ` does nothing to prevent these issues. ` unsafe ` is
237
237
used to deal with memory safety problems and it is not in any way useful to
238
- deal with semver concerns.
238
+ deal with SemVer concerns.
239
239
240
240
Forking a crate (to insert the necessary ` pub ` s) does not have these
241
- problems. As such a better way to achieve this would be to make patch
241
+ problems. As such, a better way to achieve this would be to make patch
242
242
dependencies more ergonomic to use and maintain.
0 commit comments