Skip to content

Improve wording in documentation of MaybeUninit - #64837

Merged
bors merged 1 commit into
rust-lang:masterfrom
nliberg:patch-2
Sep 29, 2019
Merged

Improve wording in documentation of MaybeUninit#64837
bors merged 1 commit into
rust-lang:masterfrom
nliberg:patch-2

Conversation

@nliberg

@nlibergnliberg commented Sep 27, 2019

Copy link
Copy Markdown
Contributor

Changes

variables are properly initialized at their respective type

into

variables are properly initialized as their respective type

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @joshtriplett

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 27, 2019
@Centril

Copy link
Copy Markdown
Contributor

This is not a typo. The use of "at" is intentional here.

@nliberg

Copy link
Copy Markdown
ContributorAuthor

@Centril
If the "at" is intentional how is the sentence to be interpreted?

For what it's worth I dropped a quick question in the Rust chat about this, and I wasn't the only one to think the current sentence sounds strange.

@Centril

Copy link
Copy Markdown
Contributor

If the "at" is intentional how is the sentence to be interpreted?

"The variable has type X and its value satisfies the invariants the type X puts upon it."

("at type X" is jargon from type theory. I don't think "as" is clearer but we can rewrite the sentence to not need it at all.)

@nliberg

Copy link
Copy Markdown
ContributorAuthor

"at type X" is jargon from type theory

I see. I was not aware of that terminology - thanks for clarifying. I expect that to be true for most people who consult the documentation though.

Comment threadsrc/libcore/mem/maybe_uninit.rs Outdated
Comment threadsrc/libcore/mem/maybe_uninit.rs Outdated
@Centril

Copy link
Copy Markdown
Contributor

r? @Centril

@nliberg Here's a wording that is hopefully clearer than both "as" and "at".

@nliberg

Copy link
Copy Markdown
ContributorAuthor

@Centril

Thanks. That wording is indeed clearer.

@Centril

Copy link
Copy Markdown
Contributor

:)

Can you squash the commits and adjust the line wrapping as well? Should be good to go after that.

@rust-highfive

This comment has been minimized.

@nliberg

Copy link
Copy Markdown
ContributorAuthor

Can you squash the commits and adjust the line wrapping as well? Should be good to go after that.

Done. I hope it's ok now.

@nlibergnliberg changed the title Fix typo in documentation of MaybeUninitImprove wording in documentation of MaybeUninitSep 28, 2019
@Centril

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Sep 28, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit fd505d7 has been approved by Centril

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 28, 2019
@RalfJung

Copy link
Copy Markdown
Member

Thanks, LGTM as well. :)

Centril added a commit to Centril/rust that referenced this pull request Sep 28, 2019
Improve wording in documentation of MaybeUninit
Changes
> variables are properly initialized **at** their respective type
into
> variables are properly initialized **as** their respective type
@CentrilCentril mentioned this pull request Sep 28, 2019
bors added a commit that referenced this pull request Sep 28, 2019
Rollup of 10 pull requests
Successful merges:
- #64131 (data_structures: Add deterministic FxHashMap and FxHashSet wrappers)
- #64387 (Fix redundant semicolon lint interaction with proc macro attributes)
- #64678 (added more context for duplicate lang item errors (fixes#60561))
- #64763 (Add E0734 and its long explanation)
- #64793 (Fix format macro expansions spans to be macro-generated)
- #64837 (Improve wording in documentation of MaybeUninit)
- #64852 (Print ParamTy span when accessing a field (#52082))
- #64875 (Upgrade async/await to "used" keywords.)
- #64876 (Fix typo in intrinsics op safety)
- #64880 (Slice docs: fix typo)
Failed merges:
r? @ghost
@bors
bors merged commit fd505d7 into rust-lang:masterSep 29, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@nliberg@rust-highfive@Centril@bors@RalfJung@joshtriplett