Skip to content

Replace if with if and only if in the definition dox of Sync - #51152

Merged
bors merged 1 commit into
rust-lang:masterfrom
crlf0710:patch-1
Jun 2, 2018
Merged

Replace if with if and only if in the definition dox of Sync#51152
bors merged 1 commit into
rust-lang:masterfrom
crlf0710:patch-1

Conversation

@crlf0710

Copy link
Copy Markdown
Member

The old text was: "The precise definition is: a type T is Sync if &T is Send."

Since we've also got

impl<'a, T> Send for &'a T where
T: Sync + ?Sized,

I purpose we can change the if to if and only if to make it more precise.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @kennytm

(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 May 29, 2018
@kennytm

Copy link
Copy Markdown
Member

@bors r+ rollup

@bors

bors commented May 30, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 0d821db has been approved by kennytm

@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 May 30, 2018
@bors

bors commented May 30, 2018

Copy link
Copy Markdown
Collaborator

🔒 Merge conflict

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 30, 2018
kennytm added a commit to kennytm/rust that referenced this pull request May 30, 2018
The old text was: "The precise definition is: a type `T` is `Sync` if `&T` is Send."
Since we've also got
```
impl<'a, T> Send for &'a T
where
T: Sync + ?Sized,
```
I purpose we can change the `if` to `if and only if` to make it more precise.
@kennytmkennytm mentioned this pull request May 30, 2018
bors added a commit that referenced this pull request May 30, 2018
Rollup of 12 pull requests
Successful merges:
- #51050 (std::fs::DirEntry.metadata(): use fstatat instead of lstat when possible)
- #51123 (Update build instructions)
- #51127 (Add doc link from discriminant struct to function.)
- #51146 (typeck: Do not pass the field check on field error)
- #51147 (Stabilize SliceIndex trait.)
- #51151 (Move slice::exact_chunks directly above exact_chunks_mut for more con…)
- #51152 (Replace `if` with `if and only if` in the definition dox of `Sync`)
- #51153 (Link panic and compile_error docs)
- #51158 (Mention spec and indented blocks in doctest docs)
- #51186 (Remove two redundant .nll.stderr files)
- #51203 (Two minor `obligation_forest` tweaks.)
- #51213 (fs: copy: Use File::set_permissions instead of fs::set_permissions)
Failed merges:
The old text was: "The precise definition is: a type T is Sync if &T is Send."
Since we've also got
```
impl<'a, T> Send for &'a T where
T: Sync + ?Sized,
```
I purpose we can change the `if` to `if and only if` to make it more precise.
@crlf0710

Copy link
Copy Markdown
MemberAuthor

Rebased

@kennytm

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Jun 1, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 8e90a2d has been approved by kennytm

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 1, 2018
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jun 1, 2018
Replace `if` with `if and only if` in the definition dox of `Sync`
The old text was: "The precise definition is: a type `T` is `Sync` if `&T` is Send."
Since we've also got
```
impl<'a, T> Send for &'a T
where
T: Sync + ?Sized,
```
I purpose we can change the `if` to `if and only if` to make it more precise.
bors added a commit that referenced this pull request Jun 2, 2018
Rollup of 5 pull requests
Successful merges:
- #51135 (Tweak output on E0599 for assoc fn used as method)
- #51152 (Replace `if` with `if and only if` in the definition dox of `Sync`)
- #51262 (Add missing whitespace in num example)
- #51272 (Remove feature flag from fs::read_to_string example)
- #51286 (Pull 1.26.2 release notes into master)
Failed merges:
@bors
bors merged commit 8e90a2d into rust-lang:masterJun 2, 2018
@crlf0710
crlf0710 deleted the patch-1 branch June 2, 2018 07:25
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.

4 participants

@crlf0710@rust-highfive@kennytm@bors