Skip to content

Commit 7227deb

Browse files
authored
Merge pull request #3244 from martinomburajr/patch-2
Some punctuation and formatting fixes on RFC255
2 parents 7532223 + 5eb9201 commit 7227deb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

text/0255-object-safety.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ SomeTrait for SomeTrait { ... }`, but that seems weird and confusing and rather
3333
like boilerplate. Note that the precise mechanism here is out of scope for this
3434
RFC).
3535

36-
This is only sound if the trait is /object-safe/. We say a method `m` on trait
36+
This is only sound if the trait is object-safe. We say a method `m` on trait
3737
`T` is object-safe if it is legal (in current Rust) to call `x.m(...)` where `x`
38-
has type `&T`, i.e., `x` is a trait object. If all methods in `T` are object-
39-
safe, then we say `T` is object-safe.
38+
has type `&T`, i.e., `x` is a trait object. If all methods in `T` are object-safe,
39+
then we say `T` is object-safe.
4040

4141
If we ignore this restriction we could allow code such as the following:
4242

@@ -61,8 +61,8 @@ traits. This makes both method call and using trait objects with generic code
6161
simpler. The downside is that it makes Rust less flexible, since not all traits
6262
can be used to create trait objects.
6363

64-
Software evolution is improved with this proposal: imagine adding a non-object-
65-
safe method to a previously object-safe trait. With this proposal, you would
64+
Software evolution is improved with this proposal: imagine adding a non-object-safe
65+
method to a previously object-safe trait. With this proposal, you would
6666
then get errors wherever a trait-object is created. The error would explain why
6767
the trait object could not be created and point out exactly which method was to
6868
blame and why. Without this proposal, the only errors you would get would be

0 commit comments

Comments
 (0)