- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
          Replace if with if and only if in the definition dox of Sync
          #51152
        
          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
          
     Merged
      
      
    Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    | r? @kennytm (rust_highfive has picked a reviewer for you, use r? to override) | 
| @bors r+ rollup | 
| 📌 Commit 0d821db has been approved by  | 
| 🔒 Merge conflict | 
    
  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.
    
    
  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.
    | Rebased | 
| @bors r+ | 
| 📌 Commit 8e90a2d has been approved by  | 
    
  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:
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      Labels
      
    S-waiting-on-bors
  Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
The old text was: "The precise definition is: a type
TisSyncif&Tis Send."Since we've also got
I purpose we can change the
iftoif and only ifto make it more precise.