1. 31 1月, 2022 20 次提交
    • M
      Rollup merge of #93485 - est31:remove_curly, r=joshtriplett · 24737bd1
      Matthias Krüger 提交于
      core: Remove some redundant {}s from the sorting code
      24737bd1
    • M
      Rollup merge of #93480 - est31:remove_unstable_deprecated, r=Mark-Simulacrum · b0cdf7e9
      Matthias Krüger 提交于
      Remove deprecated and unstable slice_partition_at_index functions
      
      They have been deprecated since commit 01ac5a97
      which was part of the 1.49.0 release, so from the point of nightly,
      11 releases ago.
      b0cdf7e9
    • M
      Rollup merge of #93471 - cuviper:direntry-file_type-stat, r=the8472 · cd27f1b5
      Matthias Krüger 提交于
      unix: Use metadata for `DirEntry::file_type` fallback
      
      When `DirEntry::file_type` fails to match a known `d_type`, we should
      fall back to `DirEntry::metadata` instead of a bare `lstat`, because
      this is faster and more reliable on targets with `fstatat`.
      cd27f1b5
    • M
      Rollup merge of #93462 - ChrisDenton:systime-doc, r=joshtriplett · bc2c4fea
      Matthias Krüger 提交于
      Document `SystemTime` platform precision
      
      Fixes #88822
      bc2c4fea
    • M
      Rollup merge of #93461 - dtolnay:fmtyield, r=davidtwco · c1e2948c
      Matthias Krüger 提交于
      Accommodate yield points in the format_args expansion
      
      Fixes #93274.
      
      For the case `println!("{} {:?}", "", async {}.await)` in the issue, the expansion before:
      
      ```rust
      ::std::io::_print(
          ::core::fmt::Arguments::new_v1(
              &["", " ", "\n"],
              &[
                  ::core::fmt::ArgumentV1::new(&"", ::core::fmt::Display::fmt),
                  ::core::fmt::ArgumentV1::new(&async {}.await, ::core::fmt::Debug::fmt),
              ],
          ),
      );
      ```
      
      After:
      
      ```rust
      ::std::io::_print(
          ::core::fmt::Arguments::new_v1(
              &["", " ", "\n"],
              &match (&"", &async {}.await) {
                  _args => [
                      ::core::fmt::ArgumentV1::new(_args.0, ::core::fmt::Display::fmt),
                      ::core::fmt::ArgumentV1::new(_args.1, ::core::fmt::Debug::fmt),
                  ],
              },
          ),
      );
      ```
      c1e2948c
    • M
      Rollup merge of #93403 - nagisa:total-cmp-review, r=joshtriplett · 8fd2ff57
      Matthias Krüger 提交于
      review the total_cmp documentation
      
      The documentation has been restructured to split out a brief summary
      paragraph out from the following elaborating paragraphs.
      
      I also attempted my hand at wording improvements and adding articles
      where I felt them missing, but being non-native english speaker these
      may need more thorough review.
      
      cc https://github.com/rust-lang/rust/issues/72599
      8fd2ff57
    • M
      Rollup merge of #93395 - camelid:reserved-sugg, r=davidtwco · 2f4602a6
      Matthias Krüger 提交于
      Improve suggestion for escaping reserved keywords
      
      r? `@davidtwco`
      2f4602a6
    • B
      Auto merge of #90891 - nbdd0121:format, r=Mark-Simulacrum · e58e7b10
      bors 提交于
      Create `core::fmt::ArgumentV1` with generics instead of fn pointer
      
      Split from (and prerequisite of) #90488, as this seems to have perf implication.
      
      `@rustbot` label: +T-libs
      e58e7b10
    • S
      review the total_cmp documentation · 78efb075
      Simonas Kazlauskas 提交于
      The documentation has been restructured to split out a brief summary
      paragraph out from the following elaborating paragraphs.
      
      I also attempted my hand at wording improvements and adding articles
      where I felt them missing, but being non-native english speaker these
      may need more thorough review.
      78efb075
    • B
      Auto merge of #92711 - zredb:issue-90187-fix, r=notriddle · 08df8b81
      bors 提交于
      rustdoc: Remove `def_id_no_primitives`
      
      Fixes #90187.
      08df8b81
    • D
      Mac calls · 858d6a07
      David Tolnay 提交于
      858d6a07
    • D
      47f92a58
    • D
      Add regression test for issue 93274 · 1dd02e32
      David Tolnay 提交于
      Currently fails with:
      
          error: future cannot be sent between threads safely
            --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:21:17
             |
          LL |     assert_send(with_await());
             |                 ^^^^^^^^^^^^ future returned by `with_await` is not `Send`
             |
             = help: the trait `Sync` is not implemented for `core::fmt::Opaque`
          note: future is not `Send` as this value is used across an await
            --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:11:37
             |
          LL |     println!("{} {:?}", "", async {}.await);
             |     --------------------------------^^^^^^-
             |     |                               |
             |     |                               await occurs here, with `$crate::format_args_nl!($($arg)*)` maybe used later
             |     has type `ArgumentV1<'_>` which is not `Send`
             |     `$crate::format_args_nl!($($arg)*)` is later dropped here
          note: required by a bound in `assert_send`
            --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:18:24
             |
          LL | fn assert_send(_: impl Send) {}
             |                        ^^^^ required by this bound in `assert_send`
      
          error: future cannot be sent between threads safely
            --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:22:17
             |
          LL |     assert_send(with_macro_call());
             |                 ^^^^^^^^^^^^^^^^^ future returned by `with_macro_call` is not `Send`
             |
             = help: the trait `Sync` is not implemented for `core::fmt::Opaque`
          note: future is not `Send` as this value is used across an await
            --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:6:17
             |
          LL |         async {}.await
             |                 ^^^^^^ await occurs here, with `$crate::format_args_nl!($($arg)*)` maybe used later
          ...
          LL |     println!("{} {:?}", "", m!());
             |     -----------------------------
             |     |                       |
             |     |                       in this macro invocation
             |     has type `ArgumentV1<'_>` which is not `Send`
             |     `$crate::format_args_nl!($($arg)*)` is later dropped here
          note: required by a bound in `assert_send`
            --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:18:24
             |
          LL | fn assert_send(_: impl Send) {}
             |                        ^^^^ required by this bound in `assert_send`
             = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
      
          error: aborting due to 2 previous errors
      1dd02e32
    • B
      Auto merge of #93482 - ehuss:rollup-qjyppci, r=ehuss · 8c7f2bf4
      bors 提交于
      Rollup of 5 pull requests
      
      Successful merges:
      
       - #92887 (Bootstrap compiler update)
       - #92908 (Render more readable macro matcher tokens in rustdoc)
       - #93183 (rustdoc: mobile nav fixes)
       - #93192 (Add VS 2022 into error message)
       - #93475 (Add test to ensure that theme is applied correctly when going back in history)
      
      Failed merges:
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      8c7f2bf4
    • E
      core: Remove some redundant {}s from the sorting code · cde240c1
      est31 提交于
      cde240c1
    • E
      Rollup merge of #93475 - GuillaumeGomez:theme-in-history, r=jsha · 5e483784
      Eric Huss 提交于
      Add test to ensure that theme is applied correctly when going back in history
      
      Fixes #93258.
      
      r? `@jsha`
      5e483784
    • E
      Rollup merge of #93192 - theidexisted:patch-1, r=wesleywiser · cee571e6
      Eric Huss 提交于
      Add VS 2022 into error message
      cee571e6
    • E
      Rollup merge of #93183 - jsha:mobile-nav-fixes, r=GuillaumeGomez · 4ddf986d
      Eric Huss 提交于
      rustdoc: mobile nav fixes
      
      - Make sure the mobile-topbar doesn't overflow its height if the user sets a bigger font.
      
      - Make sure the sidebar can be scrolled all the way to the bottom by shortening it to accommodate the mobile-topbar.
      
      - Make the item name in the mobile-topbar clickable to go to the top of the page.
      
      - Remove excess padding sidebar in mobile mode.
      
      Demo https://rustdoc.crud.net/jsha/mobile-nav-fixes/std/string/struct.String.html
      
      r? `@GuillaumeGomez`
      4ddf986d
    • E
      Rollup merge of #92908 - dtolnay:rustdoc, r=GuillaumeGomez · ba013373
      Eric Huss 提交于
      Render more readable macro matcher tokens in rustdoc
      
      Follow-up to #92334.
      
      This PR lifts some of the token rendering logic from https://github.com/dtolnay/prettyplease into rustdoc so that even the matchers for which a source code snippet is not available (because they are macro-generated, or any other reason) follow some baseline good assumptions about where the tokens in the macro matcher are appropriate to space.
      
      The below screenshots show an example of the difference using one of the gnarliest macros I could find. Some things to notice:
      
      - In the **before**, notice how a couple places break in between `$(....)`↵`*`, which is just about the worst possible place that it could break.
      
      - In the **before**, the lines that wrapped are weirdly indented by 1 space of indentation relative to column 0. In the **after**, we use the typical way of block indenting in Rust syntax which is put the open/close delimiters on their own line and indent their contents by 4 spaces relative to the previous line (so 8 spaces relative to column 0, because the matcher itself is indented by 4 relative to the `macro_rules` header).
      
      - In the **after**, macro_rules metavariables like `$tokens:tt` are kept together, which is how just about everybody writing Rust today writes them.
      
      ## Before
      
      ![Screenshot from 2022-01-14 13-05-53](https://user-images.githubusercontent.com/1940490/149585105-1f182b78-751f-421f-a234-9dbc04fa3bbd.png)
      
      ## After
      
      ![Screenshot from 2022-01-14 13-06-04](https://user-images.githubusercontent.com/1940490/149585118-d4b52ea7-3e67-4b6e-a12b-31dfb8172f86.png)
      
      r? `@camelid`
      ba013373
    • E
      Rollup merge of #92887 - pietroalbini:pa-bootstrap-update, r=Mark-Simulacrum · 0610d4fa
      Eric Huss 提交于
      Bootstrap compiler update
      
      r? ``@Mark-Simulacrum``
      0610d4fa
  2. 30 1月, 2022 18 次提交
  3. 29 1月, 2022 2 次提交