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 6 pull requests #103083

Merged
merged 22 commits into from
Oct 15, 2022
Merged

Rollup of 6 pull requests #103083

merged 22 commits into from
Oct 15, 2022

Commits on Oct 6, 2022

  1. Configuration menu
    Copy the full SHA
    99182dd View commit details
    Browse the repository at this point in the history
  2. std: add thread parking tests

    joboet committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    0ad4dd4 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2022

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

Commits on Oct 13, 2022

  1. Let chains should still drop temporaries

    by the end of the condition's execution
    nathanwhit committed Oct 13, 2022
    Configuration menu
    Copy the full SHA
    ad8b242 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e8a6e60 View commit details
    Browse the repository at this point in the history
  3. resolve: Remove redundant item lifetime ribs

    and cleanup lifetime rib walking loops
    petrochenkov committed Oct 13, 2022
    Configuration menu
    Copy the full SHA
    e94ec30 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f634106 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2022

  1. Configuration menu
    Copy the full SHA
    709a08a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4e1c09d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b841848 View commit details
    Browse the repository at this point in the history
  4. normalize stderr

    TaKO8Ki committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    5378677 View commit details
    Browse the repository at this point in the history
  5. Update cargo

    12 commits in b8f30cb23c4e5f20854a4f683325782b7cff9837..b332991a57c9d055f1864de1eed93e2178d49440
    2022-10-10 19:16:06 +0000 to 2022-10-13 22:05:28 +0000
    - Differentiate the warning when an alias (built-in or user-defined) shadows an external subcommand (rust-lang/cargo#11170)
    - chore: Update tests for latest clap (rust-lang/cargo#11235)
    - feat(publish): Support 'publish.timeout' config behind '-Zpublish-timeout' (rust-lang/cargo#11230)
    - Add missing edition (rust-lang/cargo#11231)
    - doc(profiles): add module level doc (rust-lang/cargo#11219)
    - refactor(publish): Clarify which SourceId is being used (rust-lang/cargo#11216)
    - Add new SourceKind::SparseRegistry to differentiate sparse registries (rust-lang/cargo#11209)
    - Fix deadlock when build scripts are waiting for input on stdin (rust-lang/cargo#11205)
    - refactor: New variant `FeaturesFor::ArtifactDep` (rust-lang/cargo#11184)
    - Fix rustdoc warning about unclosed HTML tag (rust-lang/cargo#11221)
    - refactor(tests): Prepare for wait-for-publish test changes (rust-lang/cargo#11210)
    - Add configuration option for controlling crates.io protocol (rust-lang/cargo#11215)
    weihanglo committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    40bb4b7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f528414 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6f0c247 View commit details
    Browse the repository at this point in the history
  8. remove no_core feature

    TaKO8Ki committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    062ea9c View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2022

  1. Rollup merge of rust-lang#102773 - joboet:apple_parker, r=thomcc

    Use semaphores for thread parking on Apple platforms
    
    Currently we use a mutex-condvar pair for thread parking on Apple systems. Unfortunately, `pthread_cond_timedwait` uses the real-time clock for measuring time, which causes problems when the system time changes. The parking implementation in this PR uses a semaphore instead, which measures monotonic time by default, avoiding these issues. As a further benefit, this has the potential to improve performance a bit, since `unpark` does not need to wait for a lock to be released.
    
    Since the Mach semaphores are poorly documented (I could not find availability or stability guarantees for instance), this uses a [dispatch semaphore](https://developer.apple.com/documentation/dispatch/dispatch_semaphore?language=objc) instead. While it adds a layer of indirection (it uses Mach semaphores internally), the overhead is probably negligible.
    
    Tested on macOS 12.5.
    
    r? ``````@thomcc``````
    Dylan-DPC committed Oct 15, 2022
    Configuration menu
    Copy the full SHA
    cbe5e7b View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#102884 - petrochenkov:liferib, r=cjgillot

    resolve: Some cleanup, asserts and tests for lifetime ribs
    
    Follow up to rust-lang#98279 and friends.
    r? ``@cjgillot``
    Dylan-DPC committed Oct 15, 2022
    Configuration menu
    Copy the full SHA
    39ff2a6 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#102954 - GuillaumeGomez:cfg-hide-attr-check…

    …s, r=Manishearth
    
    Add missing checks for `doc(cfg_hide(...))`
    
    Part of  rust-lang#43781.
    
    The `doc(cfg_hide(...))` attribute can only be used at the crate level and takes a list of attributes as argument.
    
    r? ```@Manishearth```
    Dylan-DPC committed Oct 15, 2022
    Configuration menu
    Copy the full SHA
    59e0af6 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#102998 - nathanwhit:let-chains-drop-order, …

    …r=eholk
    
    Drop temporaries created in a condition, even if it's a let chain
    
    Fixes rust-lang#100513.
    
    During the lowering from AST to HIR we wrap expressions acting as conditions in a `DropTemps` expression so that any temporaries created in the condition are dropped after the condition is executed. Effectively this means we transform
    
    ```rust
    if Some(1).is_some() { .. }
    ```
    
    into (roughly)
    
    ```rust
    if { let _t = Some(1).is_some(); _t } { .. }
    ```
    
    so that if we create any temporaries, they're lifted into the new scope surrounding the condition, so for example something along the lines of
    
    ```rust
    if { let temp = Some(1); let _t = temp.is_some(); _t }.
    ```
    
    Before this PR, if the condition contained any let expressions we would not introduce that new scope, instead leaving the condition alone. This meant that in a let-chain like
    
    ```rust
    if get_drop("first").is_some() && let None = get_drop("last") {
            println!("second");
    } else { .. }
    ```
    
    the temporary created for `get_drop("first")` would be lifted into the _surrounding block_, which caused it to be dropped after the execution of the entire `if` expression.
    
    After this PR, we wrap everything but the `let` expression in terminating scopes. The upside to this solution is that it's minimally invasive, but the downside is that in the worst case, an expression with `let` exprs interspersed like
    
    ```rust
    if get_drop("first").is_some()
        && let Some(_a) = get_drop("fifth")
        && get_drop("second").is_some()
        && let Some(_b) = get_drop("fourth") { .. }
    ```
    
    gets _multiple_ new scopes, roughly
    
    ```rust
    if { let _t = get_drop("first").is_some(); _t }
        && let Some(_a) = get_drop("fifth")
        && { let _t = get_drop("second").is_some(); _t }
        && let Some(_b) = get_drop("fourth") { .. }
    ```
    
    so instead of all of the temporaries being dropped at the end of the entire condition, they will be dropped right after they're evaluated (before the subsequent `let` expr). So while I'd say the drop behavior around let-chains is _less_ surprising after this PR, it still might not exactly match what people might expect.
    
    For tests, I've just extended the drop order tests added in rust-lang#100526. I'm not sure if that's the best way to go about it, though, so suggestions are welcome.
    Dylan-DPC committed Oct 15, 2022
    Configuration menu
    Copy the full SHA
    b79ad57 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#103003 - TaKO8Ki:fix-102989, r=compiler-errors

    Fix `suggest_floating_point_literal` ICE
    
    Fixes rust-lang#102989
    Dylan-DPC committed Oct 15, 2022
    Configuration menu
    Copy the full SHA
    65dca11 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#103041 - weihanglo:update-cargo, r=ehuss

    Update cargo
    
    12 commits in b8f30cb23c4e5f20854a4f683325782b7cff9837..b332991a57c9d055f1864de1eed93e2178d49440 2022-10-10 19:16:06 +0000 to 2022-10-13 22:05:28 +0000
    - Differentiate the warning when an alias (built-in or user-defined) shadows an external subcommand (rust-lang/cargo#11170)
    - chore: Update tests for latest clap (rust-lang/cargo#11235)
    - feat(publish): Support 'publish.timeout' config behind '-Zpublish-timeout' (rust-lang/cargo#11230)
    - Add missing edition (rust-lang/cargo#11231)
    - doc(profiles): add module level doc (rust-lang/cargo#11219)
    - refactor(publish): Clarify which SourceId is being used (rust-lang/cargo#11216)
    - Add new SourceKind::SparseRegistry to differentiate sparse registries (rust-lang/cargo#11209)
    - Fix deadlock when build scripts are waiting for input on stdin (rust-lang/cargo#11205)
    - refactor: New variant `FeaturesFor::ArtifactDep` (rust-lang/cargo#11184)
    - Fix rustdoc warning about unclosed HTML tag (rust-lang/cargo#11221)
    - refactor(tests): Prepare for wait-for-publish test changes (rust-lang/cargo#11210)
    - Add configuration option for controlling crates.io protocol (rust-lang/cargo#11215)
    Dylan-DPC committed Oct 15, 2022
    Configuration menu
    Copy the full SHA
    ac23c9f View commit details
    Browse the repository at this point in the history