Skip to content

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/dynamically-sized-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
type arguments when the type parameter has the special trait bound [`?Sized`](trait-bounds.html#sized) specified. (In other words by default any type parameter on a non-trait item

Copy link
Contributor

Choose a reason for hiding this comment

The 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
Expand Down
4 changes: 2 additions & 2 deletions src/trait-bounds.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The 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 Sized bound.)" after this sentence.

not be used as a bound for other types.

## Lifetime bounds
Expand Down