1. 24 4月, 2021 20 次提交
    • Y
      Rollup merge of #84453 - notriddle:waker-from-docs, r=cramertj · ed5646bf
      Yuki Okushi 提交于
      Document From implementations for Waker and RawWaker
      
      CC #51430
      ed5646bf
    • Y
      Rollup merge of #84436 - jyn514:private, r=petrochenkov · 570eed71
      Yuki Okushi 提交于
      Make a few functions private
      
      These were made public in 3105bcfd. This
      is so long ago I doubt anyone remembers why they're public. No one outside rustc_session uses
      them, including in-tree tools.
      570eed71
    • Y
      Rollup merge of #84320 - jsha:details-implementors, r=Manishearth,Nemo157,GuillaumeGomez · b4544698
      Yuki Okushi 提交于
      Use details tag for trait implementors.
      
      Part of #83332 and following on from #83337 and #83355.
      
      This removes one category of JS-generated toggles (implementors), and replaces them with a `<details>` tag. This simplifies the JS, and fixes some bugs where things that were supposed to be hidden by the toggle were not hidden. Compare https://hoffman-andrews.com/rust/details-implementors/std/io/trait.Read.html#impl-Read vs https://doc.rust-lang.org/nightly/std/io/trait.Read.html#implementors.
      
      This introduces a `left: -23px` to put the toggle in the correct place, matching the current style for `.collapse-toggle`.
      
      It's worth noting this introduces a slight behavior change: since the entire line is now a `<summary>`, any part of the line is clickable. So for instance, in `impl Read for File`, clicking `impl` or `for` will collapse / expand the docs. Clicking `Read` or `File` still links to the appropriate documentation as before.
      b4544698
    • Y
      Rollup merge of #84250 - jclulow:illumos-bash-bootstrap, r=Mark-Simulacrum · 5321f955
      Yuki Okushi 提交于
      bootstrap: use bash on illumos to run install scripts
      
      The default illumos shell ("sh" in the default PATH) is ksh93, rather
      than bash, and does not support constructs like "local" that came from
      bash.  The bootstrap function for invoking "install.sh" scripts should
      use "bash" explicitly there to avoid issues.
      5321f955
    • Y
      Rollup merge of #83990 - the8472:take-trusted-len, r=dtolnay · c00439f6
      Yuki Okushi 提交于
      implement `TrustedRandomAccess` for `Take` iterator adapter
      
      `TrustedRandomAccess` requires the iterator length to fit within `usize`. `take(n)` only constrains the upper bound of an iterator. So if the inner is `TrustedRandomAccess` (which already implies a finite length) then so can be `Take`.
      
      ```````@rustbot``````` label T-libs-impl
      c00439f6
    • B
      Auto merge of #83729 - JohnTitor:issue-43913, r=estebank · 8ad0821b
      bors 提交于
      Add a suggestion when using a type alias instead of trait alias
      
      Fixes #43913
      
      r? `@estebank`
      8ad0821b
    • B
      Auto merge of #84490 - JohnTitor:rollup-wrdj4ko, r=JohnTitor · bb491ed2
      bors 提交于
      Rollup of 11 pull requests
      
      Successful merges:
      
       - #80805 (Improve `Iterator::by_ref` example)
       - #84248 (Remove duplicated fn(Box<[T]>) -> Vec<T>)
       - #84321 (rustdoc: Convert sub-variant toggle to HTML)
       - #84359 ( rust-analyzer)
       - #84374 (Clean up .gitignore)
       - #84387 (Move `sys_common::poison` to `sync::poison`)
       - #84430 (doc/platform-support: clarify UEFI support)
       - #84433 (Prevent control, shift and alt keys to make search input lose focus)
       - #84444 (doc: Get rid of "[+] show undocumented items" toggle on numeric From impls)
       - #84456 (Fix ICE if original_span(fn_sig) returns a span not in body sourcefile)
       - #84469 (Update comment on `PrimTy::name_str`)
      
      Failed merges:
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      bb491ed2
    • Y
      Rollup merge of #84469 - jyn514:dead-code, r=Mark-Simulacrum · 62db03cd
      Yuki Okushi 提交于
      Update comment on `PrimTy::name_str`
      
      It's no longer used by rustdoc.
      62db03cd
    • Y
      Rollup merge of #84456 - richkadel:issue-84421, r=tmandry · e07c7b56
      Yuki Okushi 提交于
      Fix ICE if original_span(fn_sig) returns a span not in body sourcefile
      
      Fixes: #84421
      
      r? ````@tmandry````
      
      fyi: ````@wesleywiser```` ````@sdroege```` ````@rajivshah3````
      e07c7b56
    • Y
      Rollup merge of #84444 - notriddle:num-docs-from-undocumented-items-toggle, r=yaahc · 9ada731c
      Yuki Okushi 提交于
      doc: Get rid of "[+] show undocumented items" toggle on numeric From impls
      
      On most From implementations, the docstring is attached to the function. This is also how people have been [recommended] to do it.
      
      Screenshots:
      
      * [before](https://user-images.githubusercontent.com/1593513/115767662-323c5480-a35e-11eb-9918-98aba83e9183.png)
      * [after](https://user-images.githubusercontent.com/1593513/115767675-35374500-a35e-11eb-964f-c28eeb6c807a.png)
      
      [recommended]: https://github.com/rust-lang/rust/issues/51430#issuecomment-398322434
      9ada731c
    • Y
      Rollup merge of #84433 - GuillaumeGomez:search-input-blur, r=jsha · a50f5027
      Yuki Okushi 提交于
      Prevent control, shift and alt keys to make search input lose focus
      
      Part of #84384.
      
      r? ````@jsha````
      a50f5027
    • Y
      Rollup merge of #84430 - dvdhrm:rw/uefidoc, r=Amanieu · a050a49c
      Yuki Okushi 提交于
      doc/platform-support: clarify UEFI support
      
      Add missing information on what standard-library features are supported by the UEFI targets.
      
      All current UEFI targets (which is i686 and x86_64) only support no_std cross-compilations. `std` support has not been worked on and is unlikely to emerge anytime soon, due to the much restricted environment that UEFI provides.
      a050a49c
    • Y
      Rollup merge of #84387 - CDirkx:poison, r=m-ou-se · ace3bd4f
      Yuki Okushi 提交于
      Move `sys_common::poison` to `sync::poison`
      
      `sys_common` should not contain publicly exported types, only platform-independent abstractions on top of `sys`, which `sys_common::poison` is not. There is thus no reason for the module to not live under `sync`.
      
      Part of #84187.
      ace3bd4f
    • Y
      Rollup merge of #84374 - CDirkx:gitignore, r=Mark-Simulacrum · 8de00b3c
      Yuki Okushi 提交于
      Clean up .gitignore
      
      Categorizes entries in the `.gitignore` file.
      
      Other changes:
      - added `desktop.ini` (Windows equivalent of `.DS_Store`)
      - removed `.hg/` and `.hgignore`
      8de00b3c
    • Y
      Rollup merge of #84359 - lnicola:rust-analyzer-2021-04-20, r=jonas-schievink · 05588067
      Yuki Okushi 提交于
       rust-analyzer
      05588067
    • Y
      Rollup merge of #84321 - Swatinem:subvariant-details, r=GuillaumeGomez · d05e28df
      Yuki Okushi 提交于
      rustdoc: Convert sub-variant toggle to HTML
      
      Instead of creating a JS toggle, this injects details/summary for
      sub-variants of enums. This also fixes the CSS so that the toggle button
      does not jump when expanding/collapsing.
      
      Takes inspiration from #83337 and should be considered part of #83332. Not quite sure if the `.sub-variant` selectors could be further simplified? AFAICS it is only used in that place, and that does not seem to allow any recursion.
      d05e28df
    • Y
      Rollup merge of #84248 - calebsander:refactor/vec-functions, r=Amanieu · 5b7c9867
      Yuki Okushi 提交于
      Remove duplicated fn(Box<[T]>) -> Vec<T>
      
      `<[T]>::into_vec()` does the same thing as `Vec::from::<Box<[T]>>()`, so they can be implemented in terms of each other. This was the previous implementation of `Vec::from()`, but was changed in #78461. I'm not sure what the rationale was for that change, but it seems preferable to maintain a single implementation.
      5b7c9867
    • Y
      Rollup merge of #80805 - camelid:iter-by_ref-example, r=steveklabnik · dcb4083e
      Yuki Okushi 提交于
      Improve `Iterator::by_ref` example
      
      I split the example into two: one that fails to compile, and one that
      works. I also made them identical except for the addition of `by_ref`
      so we don't confuse readers with random differences.
      
      cc `@steveklabnik,` who is the one that added the previous version of this example
      dcb4083e
    • B
      Auto merge of #84339 - alexcrichton:llvm-fptoint-sat, r=nagisa · 481ba164
      bors 提交于
      rustc: Use LLVM's new saturating float-to-int intrinsics
      
      This commit updates rustc, with an applicable LLVM version, to use
      LLVM's new `llvm.fpto{u,s}i.sat.*.*` intrinsics to implement saturating
      floating-point-to-int conversions. This results in a little bit tighter
      codegen for x86/x86_64, but the main purpose of this is to prepare for
      upcoming changes to the WebAssembly backend in LLVM where wasm's
      saturating float-to-int instructions will now be implemented with these
      intrinsics.
      
      This change allows simplifying a good deal of surrounding code, namely
      removing a lot of wasm-specific behavior. WebAssembly no longer has any
      special-casing of saturating arithmetic instructions and the need for
      `fptoint_may_trap` is gone and all handling code for that is now
      removed. This means that the only wasm-specific logic is in the
      `fpto{s,u}i` instructions which only get used for "out of bounds is
      undefined behavior". This does mean that for the WebAssembly target
      specifically the Rust compiler will no longer be 100% compatible with
      pre-LLVM 12 versions, but it seems like that's unlikely to be relied on
      by too many folks.
      
      Note that this change does immediately regress the codegen of saturating
      float-to-int casts on WebAssembly due to the specialization of the LLVM
      intrinsic not being present in our LLVM fork just yet. I'll be following
      up with an LLVM update to pull in those patches, but affects a few other
      SIMD things in flight for WebAssembly so I wanted to separate this change.
      
      Eventually the entire `cast_float_to_int` function can be removed when
      LLVM 12 is the minimum version, but that will require sinking the
      complexity of it into other backends such as Cranelfit.
      481ba164
    • A
      improve wording · 85879fe8
      Arpad Borsos 提交于
      85879fe8
  2. 23 4月, 2021 20 次提交