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

Closed
wants to merge 27 commits into from
Closed

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 7, 2022

  1. Clean up rustdoc startup.

    rustc's startup has several layers, including:
    - `interface::run_compiler` passes a closure, `f`, to
      `run_in_thread_pool_with_globals`, which creates a thread pool, sets
      up session globals, and passes `f` to `create_compiler_and_run`.
    - `create_compiler_and_run` creates a `Session`, a `Compiler`, sets the
      source map, and calls `f`.
    
    rustdoc is a bit different.
    - `main_args` calls `main_options` via
      `run_in_thread_pool_with_globals`, which (again) creates a thread pool
      (hardcoded to a single thread!) and sets up session globals.
    - `main_options` has four different paths.
      - The second one calls `interface::run_compiler`, which redoes the
        `run_in_thread_pool_with_globals`! This is bad.
      - The fourth one calls `interface::create_compiler_and_run`, which is
        reasonable.
      - The first and third ones don't do anything of note involving the
        above functions, except for some symbol interning which requires
        session globals.
    
    In other words, rustdoc calls into `rustc_interface` at three different
    levels. It's a bit confused, and feels like code where functionality has
    been added by different people at different times without fully
    understanding how the globally accessible stuff is set up.
    
    This commit tidies things up. It removes the
    `run_in_thread_pool_with_globals` call in `main_args`, and adjust the
    four paths in `main_options` as follows.
    - `markdown::test` calls `test::test_main`, which provides its own
      parallelism and so doesn't need a thread pool. It had one small use of
      symbol interning, which required session globals, but the commit
      removes this.
    - `doctest::run` already calls `interface::run_compiler`, so it doesn't
      need further adjustment.
    - `markdown::render` is simple but needs session globals for interning
      (which can't easily be removed), so it's now wrapped in
      `create_session_globals_then`.
    - The fourth path now uses `interface::run_compiler`, which is
      equivalent to the old `run_in_thread_pool_with_globals` +
      `create_compiler_and_run` pairing.
    nnethercote committed Oct 7, 2022
    Configuration menu
    Copy the full SHA
    bf135de View commit details
    Browse the repository at this point in the history
  2. Merge main_options into main_args.

    There is no longer any need for them to be separate.
    nnethercote committed Oct 7, 2022
    Configuration menu
    Copy the full SHA
    c461f3a View commit details
    Browse the repository at this point in the history
  3. Inline and remove scoped_thread.

    It has a single call site, and removing it slightly improves the
    confusing tangle of nested closures present at startup.
    nnethercote committed Oct 7, 2022
    Configuration menu
    Copy the full SHA
    d156a90 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    226387a View commit details
    Browse the repository at this point in the history
  5. Inline and remove create_compiler_and_run.

    It has a single call site.
    nnethercote committed Oct 7, 2022
    Configuration menu
    Copy the full SHA
    c00937f View commit details
    Browse the repository at this point in the history
  6. Apply Lrc later to sess and codegen_backend.

    This avoids the need for a degenerate `Lrc::get_mut` call.
    nnethercote committed Oct 7, 2022
    Configuration menu
    Copy the full SHA
    8067016 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1f0463a 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 14, 2022

  1. Configuration menu
    Copy the full SHA
    76386bd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b841848 View commit details
    Browse the repository at this point in the history
  3. 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
  4. Allow dyn* upcasting

    compiler-errors committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    feb4244 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0cb217d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8c7e836 View commit details
    Browse the repository at this point in the history
  7. 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
  8. Configuration menu
    Copy the full SHA
    f528414 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    6f0c247 View commit details
    Browse the repository at this point in the history
  10. 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#101832 - compiler-errors:dyn-star-plus, r=e…

    …holk
    
    Make `dyn*` casts into a coercion, allow `dyn*` upcasting
    
    I know that `dyn*` is likely not going to be a feature exposed to surface Rust, but this makes it slightly more ergonomic to write tests for these types anyways. ... and this was just fun to implement anyways.
    
    1. Make `dyn*` into a coercion instead of a cast
    2. Enable `dyn*` upcasting since we basically get it for free
    3. Simplify some of the cast checking code since we're using the coercion path now
    
    r? `@eholk` but feel free to reassign
    cc `@nikomatsakis` and `@tmandry` who might care about making `dyn*` casts into a coercion
    Dylan-DPC authored Oct 15, 2022
    Configuration menu
    Copy the full SHA
    0c5f581 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#102769 - nnethercote:rustdoc-startup, r=jyn514

    Clean up rustdoc startup
    
    Startup is pretty hairy, in both rustdoc and rustc. The first commit here improves the rustdoc situation quite a bit. The remaining commits are smaller but also help.
    
    Best reviewed one commit at a time.
    
    r? ````@jyn514````
    Dylan-DPC authored Oct 15, 2022
    Configuration menu
    Copy the full SHA
    3654dc7 View commit details
    Browse the repository at this point in the history
  3. 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 authored Oct 15, 2022
    Configuration menu
    Copy the full SHA
    eb5863a View commit details
    Browse the repository at this point in the history
  4. 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 authored Oct 15, 2022
    Configuration menu
    Copy the full SHA
    97560c7 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 authored Oct 15, 2022
    Configuration menu
    Copy the full SHA
    de5e4e8 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 authored Oct 15, 2022
    Configuration menu
    Copy the full SHA
    8437d75 View commit details
    Browse the repository at this point in the history