-
Notifications
You must be signed in to change notification settings - Fork 532
Fix various grammatical errors around ?Sized #992
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,10 +11,10 @@ types">DSTs</abbr>. Such types can only be used in certain cases: | |
* Pointers to slices also store the number of elements of the slice. | ||
* Pointers to trait objects also store a pointer to a vtable. | ||
* <abbr title="dynamically sized types">DSTs</abbr> can be provided as | ||
type arguments when a bound of `?Sized`. By default any type parameter | ||
has a `Sized` bound. | ||
type arguments when the type parameter has the special lifetime bound [`?Sized`](trait-bounds.html#sized) specified. (In other words by default any type parameter on a non-trait item | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The parenthesis are not needed. The "In other words" already guards the sentence enough. There's also needed commas after the "In other words" and "by default". Also, as per the style guide, links in prose should just be the text and then have link refs at the bottom in alphabetical (well, UTF-8 codepoint) order. |
||
has a `Sized` bound, and specifying the `?Sized` bound removes it.) | ||
* Traits may be implemented for <abbr title="dynamically sized | ||
types">DSTs</abbr>. Unlike type parameters `Self: ?Sized` by default in trait | ||
types">DSTs</abbr>. Unlike type parameters on other kinds of items, `Self: ?Sized` is the default in trait | ||
definitions. | ||
* Structs may contain a <abbr title="dynamically sized type">DST</abbr> as the | ||
last field, this makes the struct itself a | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,8 +77,8 @@ Trait and lifetime bounds are also used to name [trait objects]. | |
|
||
## `?Sized` | ||
|
||
`?` is only used to declare that the [`Sized`] trait may not be | ||
implemented for a type parameter or associated type. `?Sized` may | ||
`?` is only used to declare that the [`Sized`] trait may be | ||
unimplemented for a type parameter or associated type. `?Sized` may | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it might be better to say "is not required" instead of "may be unimplemented". Maybe add a parenthetical "(Type parameters and associated types have an implicit |
||
not be used as a bound for other types. | ||
|
||
## Lifetime bounds | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.