about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-04-24Rollup merge of #84485 - marmeladema:trait-tests, r=jackh726Yuki Okushi-0/+81
Add some associated type bounds tests Closes #83017 Closes #81193 r? `@jackh726`
2021-04-24Rollup merge of #84458 - jyn514:cleanup-after-krate, r=GuillaumeGomezYuki Okushi-79/+39
Remove unnecessary fields and parameters in rustdoc r? `@GuillaumeGomez`
2021-04-24Rollup merge of #84320 - jsha:details-implementors, ↵Yuki Okushi-66/+68
r=Manishearth,Nemo157,GuillaumeGomez 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.
2021-04-24Rollup merge of #84250 - jclulow:illumos-bash-bootstrap, r=Mark-SimulacrumYuki Okushi-1/+6
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.
2021-04-23Auto merge of #83729 - JohnTitor:issue-43913, r=estebankbors-16/+53
Add a suggestion when using a type alias instead of trait alias Fixes #43913 r? `@estebank`
2021-04-23Auto merge of #84490 - JohnTitor:rollup-wrdj4ko, r=JohnTitorbors-31/+51
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 (:arrow_up: 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
2021-04-24Rollup merge of #84433 - GuillaumeGomez:search-input-blur, r=jshaYuki Okushi-3/+6
Prevent control, shift and alt keys to make search input lose focus Part of #84384. r? ````@jsha````
2021-04-24Rollup merge of #84430 - dvdhrm:rw/uefidoc, r=AmanieuYuki Okushi-2/+2
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.
2021-04-24Rollup merge of #84359 - lnicola:rust-analyzer-2021-04-20, r=jonas-schievinkYuki Okushi-18/+17
:arrow_up: rust-analyzer
2021-04-24Rollup merge of #84321 - Swatinem:subvariant-details, r=GuillaumeGomezYuki Okushi-8/+26
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.
2021-04-23Auto merge of #84339 - alexcrichton:llvm-fptoint-sat, r=nagisabors-173/+12
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.
2021-04-23Add test for issue #81193marmeladema-0/+15
2021-04-23Add test for issue #83017marmeladema-0/+66
2021-04-23improve wordingArpad Borsos-2/+8
2021-04-23Update wasm test assertionsAlex Crichton-173/+12
2021-04-23Auto merge of #84457 - jyn514:cleanup-crate, r=GuillaumeGomezbors-132/+150
rustdoc: Remove most fields from ExternalCrate Once https://github.com/rust-lang/rust/issues/84304 is fixed, I can get rid of ExternCrate altogether in favor of CrateNum, but in the meantime, this shrinks ExternalCrate quite a lot. This might hurt compile-times; if it does, I can add `primitive` and `keyword` queries. I expect this to improve compilemem. Helps with https://github.com/rust-lang/rust/issues/76382. r? GuillaumeGomez
2021-04-23Auto merge of #84445 - jyn514:hidden, r=<try>bors-6/+44
rustdoc: Hide `#text` in doc-tests Since `#![attr]` and `#[attr]` are the only valid syntax that start with `#`, we can just special case those two tokens. Fixes https://github.com/rust-lang/rust/issues/83284.
2021-04-22Remove unnecessary item_name parameter to `mod_item_in`Joshua Nelson-11/+9
2021-04-22Remove unnecessary `item_name` parameter to `mod_item_out`Joshua Nelson-7/+5
2021-04-22Remove unnecessary `edition` field on SharedContextJoshua Nelson-9/+10
2021-04-22Remove unnecessary `edition` parameter to rendererJoshua Nelson-25/+6
2021-04-22Remove unnecessary `diag` parameter to `after_krate`Joshua Nelson-16/+10
2021-04-22Remove unnecessary `crate_name` parameter to `after_krate`Joshua Nelson-19/+7
It's always `tcx.crate_name(LOCAL_CRATE)`, it doesn't need to be passed in separately.
2021-04-22Remove `keywords` from ExternCrateJoshua Nelson-52/+57
2021-04-22Get rid of ExternCrate::primitivesJoshua Nelson-77/+77
2021-04-22Remove `name` field from ExternalCrateJoshua Nelson-7/+12
2021-04-22Remove src field from ExternCrateJoshua Nelson-6/+14
2021-04-22rustdoc: Hide `#text` in doc-testsJoshua Nelson-6/+44
Since `#![attr]` and `#[attr]` are the only valid syntax that start with `#`, we can just special case those two tokens.
2021-04-22Auto merge of #84420 - workingjubilee:microvec, r=Mark-Simulacrumbors-6/+5
Use arrayvec 0.7, drop smallvec 0.6 With the arrival of min const generics, many alt-vec libraries have updated to use it in some way and arrayvec is no exception. Use the latest with minor refactoring. Also, rustc_workspace_hack is the only user of smallvec 0.6 in the entire tree, so drop it.
2021-04-22Rollup merge of #84404 - tmiasko:intrinsics-in-coercion-lub, r=Mark-SimulacrumDylan DPC-1/+18
Check for intrinsics before coercing to a function pointer Return an error if coercing function items / non-capturing closures to a common function pointer type would require reifying an intrinsic. Turns ICE reported in #84297 into a proper error.
2021-04-22Rollup merge of #84396 - Amanieu:fix_compiler_builtins_llvm, r=cuviperDylan DPC-0/+0
Update LLVM submodule Fixes #83467
2021-04-22Rollup merge of #84376 - torhovland:issue-84534, r=GuillaumeGomezDylan DPC-4/+9
Uses flex to fix formatting of h1 at any width Fixes #84354.
2021-04-22Prevent control, shift and alt keys to make search input lose focusGuillaume Gomez-3/+6
2021-04-22doc/platform-support: clarify UEFI supportDavid Rheinsberg-2/+2
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.
2021-04-22Auto merge of #84289 - andersk:bootstrap-bulk-dir, r=Mark-Simulacrumbors-2/+19
bootstrap: Restore missing --bulk-dirs for rust-docs, rustc-docs The `--bulk-dirs` argument was removed for rust-docs in commit c768ce138427b1844c1f6594daba9c0e33928032 and rustc-docs in commit 8ca46fc7a83734c9622f11f25d16b82316f44bcc (#79788), presumably by mistake; that slowed down installation of rust-docs from under a second to some twenty *minutes*. Restoring `--bulk-dirs` reverses this slowdown. Fixes #80684. Cc `@pietroalbini.`
2021-04-21Use arrayvec 0.7, drop smallvec 0.6Jubilee Young-6/+5
With the arrival of min const generics, many alt-vec libraries have updated to use it in some way and arrayvec is no exception. Use the latest with minor refactoring. Also, rustc_workspace_hack is the only user of smallvec 0.6 in the entire tree, so drop it.
2021-04-21Rollup merge of #84393 - GuillaumeGomez:better-open-handling, r=jyn514Mara Bos-6/+10
Support `x.py doc std --open` I usually run this command: ``` ./x.py doc std --stage 1 --jobs 8 ``` Then I gave a try to `--open` and realized it wasn't working. I finally realized it was simply because it was only handling paths starting with `library`. This PR allows to handle both kinds of paths. cc ``@jyn514`` r? ``@Mark-Simulacrum``
2021-04-21Rollup merge of #84380 - Smittyvb:rdoc-title-order, r=jshaMara Bos-20/+56
Write Rustdoc titles like "x in crate::mod - Rust" This makes Rustdoc titles for items be like "Widget in cratename::blah::foo - Rust". Titles for modules and other non-items are unchanged, and still read like "cratename::blah::foo - Rust". This makes managing several open Rustdoc tabs easier. ![A screenshot of several open Rustdoc tabs](https://user-images.githubusercontent.com/10530973/115457675-d608f180-a1f2-11eb-87a8-838a32b4e3f7.png) This also adds some tests for the new title behavior. Closes #84371.
2021-04-21Rollup merge of #84379 - marmeladema:test-for-issue-79949, r=jackh726Mara Bos-0/+317
Add GAT related tests Closes #79949 Closes #79636 Closes #78671 Closes #70303 Closes #70304 Closes #71176
2021-04-21Rollup merge of #84378 - starthal:patch-1, r=jyn514Mara Bos-1/+1
Fix broken doc link
2021-04-21Replaced flex gap with margin, for compatibility with older browsers.Tor Hovland-1/+1
2021-04-21Auto merge of #84394 - m-ou-se:upgrade-ci-dep-expat, r=Mark-Simulacrumbors-1/+1
Upgrade `expat` dependency in riscv64 to newer version. The old version was renamed to `expat-2.2.6-RENAMED-VULNERABLE-PLEASE-USE-2.3.0-INSTEAD`. :) r? `@Mark-Simulacrum`
2021-04-21Update LLVM submoduleAmanieu d'Antras-0/+0
Fixes #83467
2021-04-21Upgrade `expat` dependency in riscv64 to newer version.Mara Bos-1/+1
The old version was renamed to `expat-2.2.6-RENAMED-VULNERABLE-PLEASE-USE-2.3.0-INSTEAD`. :)
2021-04-21Correctly handle --open argument on doc commandGuillaume Gomez-6/+10
2021-04-21Check for intrinsics before coercing to a function pointerTomasz Miąsko-1/+18
Return an error if coercing function items / non-capturing closures to a common function pointer type would require reifying an intrinsic.
2021-04-20Just merge all of the <title> tests into oneSmitty-7/+8
2021-04-20Add test for title of root page in item-title.rsSmitty-3/+2
2021-04-21Add test for issue #71176marmeladema-0/+40
2021-04-21Add test for issue #70304marmeladema-0/+78