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 #94469

Merged
merged 34 commits into from
Mar 1, 2022
Merged

Rollup of 7 pull requests #94469

merged 34 commits into from
Mar 1, 2022

Commits on Nov 28, 2021

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

Commits on Jan 27, 2022

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

Commits on Jan 28, 2022

  1. Configuration menu
    Copy the full SHA
    eae2026 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d90138b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2d2163b View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2022

  1. Merge portable-simd#203 - deantvv/add-spectral-norm

    Add spectral_norm example from packed_simd
    workingjubilee authored Feb 2, 2022
    Configuration menu
    Copy the full SHA
    01350a2 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2022

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

Commits on Feb 8, 2022

  1. Remove overflow panic from divrem

    Includes some remarks in intrinsics.rs,
    generated while auditing the interface for remaining UB.
    workingjubilee committed Feb 8, 2022
    Configuration menu
    Copy the full SHA
    672bfeb View commit details
    Browse the repository at this point in the history
  2. Document Simd is Simd<Wrapping<T>, N>

    and other quirks like panicking
    and the equivalence to zipping and mapping binary ops
    workingjubilee committed Feb 8, 2022
    Configuration menu
    Copy the full SHA
    e628a29 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2022

  1. Review for clarity and concision

    Co-authored-by: Caleb Zulawski <caleb.zulawski@gmail.com>
    workingjubilee and calebzulawski committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    5d52455 View commit details
    Browse the repository at this point in the history
  2. Merge rust-lang/portable-simd#243 from ./no-overflow-panic

    Remove overflow panic from divrem and add basic docs to Simd<T, N>
    
    This finishes normalizing Simd<T, N> to being approximately equivalent to Simd<Wrapping<T>, N> for all implemented operations I can think of. It also documents this fact, allowing this to close rust-lang/portable-simd#56.
    workingjubilee authored Feb 9, 2022
    Configuration menu
    Copy the full SHA
    6143bde View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2022

  1. Add some safety comments

    calebzulawski authored and workingjubilee committed Feb 10, 2022
    Configuration menu
    Copy the full SHA
    dddfffc View commit details
    Browse the repository at this point in the history
  2. rust-lang/portable-simd#245: Explain unsafe contracts of core::simd

    * Explain unsafe contracts of core::simd
    
    This permeates the module with remarks on safety for pub methods,
    layout of the Simd type, correct use of intrinsics, et cetera.
    This is mostly to help others curious about how core::simd works,
    including other Rust contributors, `unsafe` library authors,
    and eventually ourselves.
    workingjubilee authored Feb 10, 2022
    Configuration menu
    Copy the full SHA
    78a18c3 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2022

  1. Fix setsockopt and getsockopt parameter names.

    Previously `level` was named `opt` and `option_name` was named `val`,
    then extra names of `payload` or `slot` were used for the option value.
    This change aligns the wrapper parameters with their names in POSIX.
    Winsock uses similar but more abbreviated names: `level`, `optname`,
    `optval`, `optlen`.
    chrisnc committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    3eb983e View commit details
    Browse the repository at this point in the history
  2. Remove assertion on output length for getsockopt.

    POSIX allows `getsockopt` to set `*option_len` to a smaller value if
    necessary. Windows will set `*option_len` to 1 for boolean options even
    when the caller passes a `BOOL` (`int`) with `*option_len` as 4.
    chrisnc committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    f2ebd0a View commit details
    Browse the repository at this point in the history
  3. use BOOL for TCP_NODELAY setsockopt value on Windows

    This issue was found by the Wine project and mitigated there [1].
    
    Windows' documented interface for `setsockopt` expects a `BOOL` (a
    `typedef` for `int`) for `TCP_NODELAY` [2]. Windows is forgiving and
    will accept any positive length and interpret the first byte of
    `*option_value` as the value, so this bug does not affect Windows
    itself, but does affect systems implementing Windows' interface more
    strictly, such as Wine. Wine was previously passing this through to the
    host's `setsockopt`, where, e.g., Linux requires that `option_len` be
    correct for the chosen option, and `TCP_NODELAY` expects an `int`.
    
    [1]: https://source.winehq.org/git/wine.git/commit/d6ea38f32dfd3edbe107a255c37e9f7f3da06ae7
    [2]: https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-setsockopt
    chrisnc committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    b02698c View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2022

  1. Use bitmask trait

    calebzulawski authored and workingjubilee committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    842ac87 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    11c3eef View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    20fa4b7 View commit details
    Browse the repository at this point in the history
  4. Add Atomic*::from_mut_slice

    cuviper committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    d3d2a27 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2022

  1. rust-lang/portable-simd#239: Bitmask conversion trait

    Another approach that fixes rust-lang/portable-simd#223, as an alternative to rust-lang/portable-simd#238.
    
    This adds the `ToBitMask` trait, which is implemented on a vector for each bitmask type it supports.  This includes all unsigned integers with enough bits to contain it.  The byte array variant has been separated out for now into rust-lang/portable-simd#246 and still requires `generic_const_exprs`, but the integer variants no longer require it and can make it to nightly.
    workingjubilee authored Feb 26, 2022
    Configuration menu
    Copy the full SHA
    5f49d4c View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2022

  1. Lint against more useless #[must_use] attributes

    This expands the existing `#[must_use]` check in `unused_attributes`
    to lint against pretty much everything `#[must_use]` doesn't support.
    Fixes rust-lang#93906.
    PatchMixolydic committed Feb 27, 2022
    Configuration menu
    Copy the full SHA
    6dcf5d8 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2022

  1. Configuration menu
    Copy the full SHA
    5ce3f56 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4de99e1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d956c8b View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2022

  1. Rollup merge of rust-lang#91545 - compiler-errors:deref-suggestion-im…

    …provements, r=estebank
    
    Generalize "remove `&`"  and "add `*`" suggestions to more than one deref
    
    Suggest removing more than one `&` and `&mut`, along with suggesting adding more than one `*` (or a combination of the two).
    
    r? `@estebank`
    (since you're experienced with these types of suggestions, feel free to reassign)
    Dylan-DPC authored Mar 1, 2022
    Configuration menu
    Copy the full SHA
    4bd40d6 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#93385 - CraftSpider:rustdoc-ty-fixes, r=cam…

    …elid
    
    Rustdoc ty consistency fixes
    
    Changes to make rustdoc cleaning of ty more consistent with hir, and hopefully use it in more places.
    
    r? `@camelid`
    Dylan-DPC authored Mar 1, 2022
    Configuration menu
    Copy the full SHA
    2fb5a16 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#93926 - PatchMixolydic:bugfix/must_use-on-e…

    …xprs, r=cjgillot
    
    Lint against more useless `#[must_use]` attributes
    
    This expands the existing `#[must_use]` check in `unused_attributes` to lint against pretty much everything `#[must_use]` doesn't support.
    Fixes rust-lang#93906.
    Dylan-DPC authored Mar 1, 2022
    Configuration menu
    Copy the full SHA
    daed864 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#94094 - chrisnc:tcp-nodelay-windows-bool, r…

    …=dtolnay
    
    use BOOL for TCP_NODELAY setsockopt value on Windows
    
    This issue was found by the Wine project and mitigated there [^1].
    
    Windows' setsockopt expects a BOOL (a typedef for int) for TCP_NODELAY
    [^2]. Windows itself is forgiving and will accept any positive optlen and
    interpret the first byte of *optval as the value, so this bug does not
    affect Windows itself, but does affect systems implementing Windows'
    interface more strictly, such as Wine. Wine was previously passing this
    through to the host's setsockopt, where, e.g., Linux requires that
    optlen be correct for the chosen option, and TCP_NODELAY expects an int.
    
    [^1]: https://source.winehq.org/git/wine.git/commit/d6ea38f32dfd3edbe107a255c37e9f7f3da06ae7
    [^2]: https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-setsockopt
    Dylan-DPC authored Mar 1, 2022
    Configuration menu
    Copy the full SHA
    06d47a4 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#94384 - cuviper:atomic-slice, r=dtolnay

    Add Atomic*::from_mut_slice
    
    Tracking issue rust-lang#76314 for `from_mut` has a question about the possibility of `from_mut_slice`, and I found a real case for it. A user in the forum had a parallelism problem that could be solved by open-indexing updates to a vector of atomics, but they didn't want to affect the other code using that vector. Using `from_mut_slice`, they could borrow that data as atomics just long enough for their parallel loop.
    
    ref: https://users.rust-lang.org/t/sharing-vector-with-rayon-par-iter-correctly/72022
    Dylan-DPC authored Mar 1, 2022
    Configuration menu
    Copy the full SHA
    5bd119d View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#94448 - c410-f3r:yet-more-let-chains, r=est…

    …ebank
    
    5 - Make more use of `let_chains`
    
    Continuation of rust-lang#94376.
    
    cc rust-lang#53667
    Dylan-DPC authored Mar 1, 2022
    Configuration menu
    Copy the full SHA
    bf6954b View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#94452 - workingjubilee:sync-simd-bitmasks, …

    …r=workingjubilee
    
    Sync portable-simd for bitmasks &c.
    
    In the ideal case, where everything works easily and nothing has to be rearranged, it is as simple as:
    - `git subtree pull -P library/portable-simd https://github.com/rust-lang/portable-simd - ${branch}`
    - write the commit message
    - `python x.py test --stage 1` to make sure it runs
    - `git push` to your PR-to-rustc branch
    
    If anything borks up this flow, you can fix it with sufficient git wizardry but you are usually better off going back to the source, fixing it, and starting over, before you open the PR.
    
    r? `@calebzulawski`
    Dylan-DPC authored Mar 1, 2022
    Configuration menu
    Copy the full SHA
    4001d98 View commit details
    Browse the repository at this point in the history