Skip to content
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

Rollup of 7 pull requests #76637

Merged
merged 23 commits into from
Sep 12, 2020
Merged

Rollup of 7 pull requests #76637

merged 23 commits into from
Sep 12, 2020

Commits on Sep 3, 2020

  1. Configuration menu
    Copy the full SHA
    ccf1f58 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2020

  1. Configuration menu
    Copy the full SHA
    b869aa5 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2020

  1. Add MaybeUninit::drop.

    ManuallyDrop's documentation tells the user to use MaybeUninit instead
    when handling uninitialized data. However, the main functionality of
    ManuallyDrop (drop) was not available directly on MaybeUninit. Adding it
    makes it easier to switch from one to the other.
    m-ou-se committed Sep 8, 2020
    Configuration menu
    Copy the full SHA
    75e471a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    caef832 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2020

  1. Configuration menu
    Copy the full SHA
    656a17b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a14efd1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a94b2cb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    43c7a9b View commit details
    Browse the repository at this point in the history
  5. Eliminate mut reference UB in Drop impl for Rc<T>

    This changes `self.ptr.as_mut()` with `get_mut_unchecked` which
    does not use an intermediate reference.  Arc<T> already handled this
    case properly.
    carbotaniuman committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    493c037 View commit details
    Browse the repository at this point in the history
  6. Add WeakInner<'_> and have Weak::inner() return it

    This avoids overlapping a reference covering the data field,
    which may be changed due in concurrent conditions. This fully
    fixed the UB mainfested with `new_cyclic`.
    carbotaniuman committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    8f43fa0 View commit details
    Browse the repository at this point in the history
  7. Format

    carbotaniuman committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    bb57c9f View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2020

  1. Update std::os module documentation.

    Adds missing descriptions for the modules std::os::linux::fs and std::os::windows::io.
    Also adds punctuation for consistency with other descriptions.
    CDirkx committed Sep 11, 2020
    Configuration menu
    Copy the full SHA
    954361a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9abc6bd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5e188f5 View commit details
    Browse the repository at this point in the history
  4. Address review comments

    carbotaniuman committed Sep 11, 2020
    Configuration menu
    Copy the full SHA
    b729368 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bb9ce7c View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2020

  1. Rollup merge of rust-lang#76114 - marmeladema:duration-saturating-ops…

    …, r=shepmaster
    
    Add saturating methods for `Duration`
    
    In some project, I needed a `saturating_add` method for `Duration`. I implemented it myself but i thought it would be a nice addition to the standard library as it matches closely with the integers types.
    
    3 new methods have been introduced and are gated by the new `duration_saturating_ops` unstable feature:
    * `Duration::saturating_add`
    * `Duration::saturating_sub`
    * `Duration::saturating_mul`
    
    If have left the tracking issue to `none` for now as I want first to understand if those methods would be acceptable at all. If agreed, I'll update the PR with the tracking issue.
    
    Further more, to match the behavior of integers types, I introduced 2 associated constants:
    * `Duration::MIN`: this one is somehow a duplicate from `Duration::zero()` method, but at the time this method was added, `MIN` was rejected as it was considered a different semantic (see rust-lang#72790 (comment)).
    * `Duration::MAX`
    
    Both have been gated by the already existing unstable feature `duration_constants`, I can introduce a new unstable feature if needed or just re-use the `duration_saturating_ops`.
    
    We might have to decide whether:
    * `MIN` should be replaced by `ZERO`?
    * associated constants over methods?
    RalfJung committed Sep 12, 2020
    Configuration menu
    Copy the full SHA
    7344f93 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#76297 - lcnr:const-ty-alias, r=varkor

    rustdoc: fix min_const_generics with ty::Param
    
    fixes rust-lang#75913
    
    r? @varkor cc @jyn514
    RalfJung committed Sep 12, 2020
    Configuration menu
    Copy the full SHA
    5d90d6e View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#76484 - fusion-engineering-forks:maybe-unin…

    …it-drop, r=RalfJung
    
    Add MaybeUninit::assume_init_drop.
    
    `ManuallyDrop`'s documentation tells the user to use `MaybeUninit` instead when handling uninitialized data. However, the main functionality of `ManuallyDrop` (`drop`) is not available directly on `MaybeUninit`. Adding it makes it easier to switch from one to the other.
    
    I re-used the `maybe_uninit_extra` feature and tracking issue number (rust-lang#63567), since it seems very related. (And to avoid creating too many features tracking issues for `MaybeUninit`.)
    RalfJung committed Sep 12, 2020
    Configuration menu
    Copy the full SHA
    c20356e View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#76530 - carbotaniuman:fix-rc, r=RalfJung

    Eliminate mut reference UB in Drop impl for Rc<T>
    
    This changes `self.ptr.as_mut()` with `get_mut_unchecked` which
    does not use an intermediate reference.  Arc<T> already handled this
    case properly.
    
    Fixes rust-lang#76509
    RalfJung committed Sep 12, 2020
    Configuration menu
    Copy the full SHA
    a49451c View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#76583 - CDirkx:os-doc, r=jonas-schievink

    Update `std::os` module documentation.
    
    Adds missing descriptions for the modules `std::os::linux::fs` and `std::os::windows::io`.
    Also adds punctuation for consistency with other descriptions.
    RalfJung committed Sep 12, 2020
    Configuration menu
    Copy the full SHA
    2477f07 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#76599 - hameerabbasi:const-generics-revs, r…

    …=lcnr
    
    Finish off revisions for const generics UI tests.
    
    This time it really does fix it. 😅 The only ones left are `min-and-full-same-time.rs`, which doesn't need it, and `array-impls/` which check the feature indirectly.
    
    Fixes rust-lang#75279.
    
    r? @lcnr
    RalfJung committed Sep 12, 2020
    Configuration menu
    Copy the full SHA
    90c5b8f View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#76615 - GuillaumeGomez:missing-examples-bin…

    …ary-ops, r=jyn514
    
    Add missing examples on binary core traits
    
    r? @jyn514
    RalfJung committed Sep 12, 2020
    Configuration menu
    Copy the full SHA
    0ed4bc5 View commit details
    Browse the repository at this point in the history