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 9 pull requests #104655

Merged
merged 22 commits into from
Nov 21, 2022
Merged

Rollup of 9 pull requests #104655

merged 22 commits into from
Nov 21, 2022

Commits on Nov 15, 2022

  1. Fix building of aarch64-pc-windows-gnullvm

    That change had been lost during rebase
    mati865 committed Nov 15, 2022
    Configuration menu
    Copy the full SHA
    c823537 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2022

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

Commits on Nov 18, 2022

  1. Configuration menu
    Copy the full SHA
    bb0cb9a View commit details
    Browse the repository at this point in the history
  2. rustdoc: remove unused JS IIFE from main.js

    This [IIFE] made sense when it was added in
    deaf5e2 and there was a local variable
    scoped to it, but now it calls a function, but declares nothing.
    
    [IIFE]: https://developer.mozilla.org/en-US/docs/Glossary/IIFE "immediately invoked function expression"
    notriddle committed Nov 18, 2022
    Configuration menu
    Copy the full SHA
    7db7cbd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    96650fc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8c38cb7 View commit details
    Browse the repository at this point in the history
  5. Apply suggestions from code review

    Fix spelling error.
    zachs18 committed Nov 18, 2022
    Configuration menu
    Copy the full SHA
    f542b06 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    734f724 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2022

  1. Configuration menu
    Copy the full SHA
    2bb28c1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e19bc6e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    428ab59 View commit details
    Browse the repository at this point in the history
  4. replace unusual grammar

    tshepang committed Nov 20, 2022
    Configuration menu
    Copy the full SHA
    bebe5db View commit details
    Browse the repository at this point in the history
  5. add examples to chunks remainder methods. Also fixed some links to rc…

    …hunk remainder methods.
    pnkfelix committed Nov 20, 2022
    Configuration menu
    Copy the full SHA
    98993af View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#101310 - zachs18:rc_get_unchecked_mut_docs_…

    …soundness, r=Mark-Simulacrum
    
    Clarify and restrict when `{Arc,Rc}::get_unchecked_mut` is allowed.
    
    (Tracking issue for `{Arc,Rc}::get_unchecked_mut`: rust-lang#63292)
    
    (I'm using `Rc` in this comment, but it applies for `Arc` all the same).
    
    As currently documented, `Rc::get_unchecked_mut` can lead to unsoundness when multiple `Rc`/`Weak` pointers to the same allocation exist. The current documentation only requires that other `Rc`/`Weak` pointers to the same allocation "must not be dereferenced for the duration of the returned borrow". This can lead to unsoundness in (at least) two ways: variance, and `Rc<str>`/`Rc<[u8]>` aliasing. ([playground link](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=d7e2d091c389f463d121630ab0a37320)).
    
    This PR changes the documentation of `Rc::get_unchecked_mut` to restrict usage to when all `Rc<T>`/`Weak<T>` have the exact same `T` (including lifetimes). I believe this is sufficient to prevent unsoundness, while still allowing `get_unchecked_mut` to be called on an aliased `Rc` as long as the safety contract is upheld by the caller.
    
    ## Alternatives
    
    * A less strict, but still sound alternative would be to say that the caller must only write values which are valid for all aliased `Rc`/`Weak` inner types. (This was [mentioned](rust-lang#63292 (comment)) in the tracking issue). This may be too complicated to clearly express in the documentation.
    * A more strict alternative would be to say that there must not be any aliased `Rc`/`Weak` pointers, i.e. it is required that get_mut would return `Some(_)`. (This was also mentioned in the tracking issue). There is at least one codebase that this would cause to become unsound ([here](https://github.com/kaimast/lsm-rs/blob/be5a164d770d850d905e510e2966ad4b1cc9aa5e/src/memtable.rs#L166), where additional locking is used to ensure unique access to an aliased `Rc<T>`;  I saw this because it was linked on the tracking issue).
    matthiaskrgr authored Nov 20, 2022
    Configuration menu
    Copy the full SHA
    b4513ce View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#104461 - mati865:gnullvm-aarch64-fixup, r=M…

    …ark-Simulacrum
    
    Fix building of `aarch64-pc-windows-gnullvm`
    
    That change had been lost during rebase of my last PR (rust-lang#103894).
    matthiaskrgr authored Nov 20, 2022
    Configuration menu
    Copy the full SHA
    6a722aa View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#104487 - klensy:ntapi, r=Mark-Simulacrum

    update ntapi dep to remove future-incompat warning
    
    This fixes warning https://github.com/rust-lang-ci/rust/actions/runs/3477235400/jobs/5813202075#step:25:217
    `warning: the following packages contain code that will be rejected by a future version of Rust: ntapi v0.3.7`
    
    by upgrading `sysinfo` version (https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md#0267)
    
    There was some breaking changes in `sysinfo`:
    * 0.25.0 (System::refresh_cpu behaviour changed: it only computes CPU usage and doesn't retrieve CPU frequency.) not affected?
    * 0.26.0 (Switch memory unit from kilobytes to bytes) fixed.
    matthiaskrgr authored Nov 20, 2022
    Configuration menu
    Copy the full SHA
    7a10c4a View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#104504 - compiler-errors:fru-syntax-note, r…

    …=estebank
    
    Add a detailed note for missing comma typo w/ FRU syntax
    
    Thanks to `@pierwill` for working on this with me!
    
    Fixes rust-lang#104373, perhaps `@alice-i-cecile` can comment on the new error for the example provided on that issue -- feedback is welcome.
    
    ```
    error[E0063]: missing field `defaulted` in initializer of `Outer`
      --> $DIR/multi-line-fru-suggestion.rs:14:5
       |
    LL |     Outer {
       |     ^^^^^ missing `defaulted`
       |
    note: this expression may have been misinterpreted as a `..` range expression
      --> $DIR/multi-line-fru-suggestion.rs:16:16
       |
    LL |           inner: Inner {
       |  ________________^
    LL | |             a: 1,
    LL | |             b: 2,
    LL | |         }
       | |_________^ this expression does not end in a comma...
    LL |           ..Default::default()
       |           ^^^^^^^^^^^^^^^^^^^^ ... so this is interpreted as a `..` range expression, instead of functional record update syntax
    help: to set the remaining fields from `Default::default()`, separate the last named field with a comma
       |
    LL |         },
       |          +
    
    error: aborting due to previous error
    
    For more information about this error, try `rustc --explain E0063`.
    ```
    matthiaskrgr authored Nov 20, 2022
    Configuration menu
    Copy the full SHA
    fce077b View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#104581 - notriddle:notriddle/js-iife-2, r=G…

    …uillaumeGomez
    
    rustdoc: remove unused JS IIFE from main.js
    
    This [IIFE] made sense when it was added in deaf5e2 and there was a local variable scoped to it, but now it calls a function, but declares nothing.
    
    [IIFE]: https://developer.mozilla.org/en-US/docs/Glossary/IIFE "immediately invoked function expression"
    matthiaskrgr authored Nov 20, 2022
    Configuration menu
    Copy the full SHA
    b2ee0df View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#104632 - RalfJung:core-test-strict-provenan…

    …ce, r=thomcc
    
    avoid non-strict-provenance casts in libcore tests
    
    r? `@thomcc`
    matthiaskrgr authored Nov 20, 2022
    Configuration menu
    Copy the full SHA
    ff72187 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#104634 - RalfJung:core-arch, r=Mark-Simulacrum

    move core::arch into separate file
    
    This works around rust-lang#104633 which otherwise leads to warnings in miri-test-libstd.
    matthiaskrgr authored Nov 20, 2022
    Configuration menu
    Copy the full SHA
    b3d4916 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#104641 - tshepang:grammar, r=Mark-Simulacrum

    replace unusual grammar
    matthiaskrgr authored Nov 20, 2022
    Configuration menu
    Copy the full SHA
    9a95696 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#104643 - pnkfelix:examples-for-chunks-remai…

    …nder, r=scottmcm
    
    add examples to chunks remainder methods.
    
    add examples to chunks remainder methods.
    
    my motivation for adding the examples was to make it very clear that the state of the iterator (in terms of where its cursor lies) has no effect on what remainder returns.
    
    Also fixed some links to rchunk remainder methods.
    matthiaskrgr authored Nov 20, 2022
    Configuration menu
    Copy the full SHA
    8465748 View commit details
    Browse the repository at this point in the history