about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-09-09Remove unnecessary `TRY_LOAD_FROM_DISK` constantJoshua Nelson-9/+2
2022-09-09Move `TRY_LOAD_FROM_DISK` out of `rustc_queries` to `rustc_query_impl`Joshua Nelson-5/+7
We want to refer to `crate::plumbing::try_load_from_disk` in the const, but hard-coding it in rustc_queries, where we don't yet know the crate this macro will be called in, seems kind of hacky. Do it in query_impl instead.
2022-09-09Remove `cache_on_disk` from `QueryVTable`Joshua Nelson-13/+6
This is not only simpler, but removes a generic function and unwrap. I have hope it will see compile time and bootstrap time improvements.
2022-09-09Don't create a new `try_load_from_disk` closure for each queryJoshua Nelson-2/+27
Instead, define a single function, parameterized only by the return type.
2022-09-09Remove dead `load_cached` code in rustc_queryJoshua Nelson-33/+2
2022-09-09Don't use a custom disk loader for diagnostic_only_typeckJoshua Nelson-7/+0
This uses exactly the same types for query results as `typeck`, which doesn't have custom code. It's not clear to me why this code exists (it goes back even before queries used a proc macro), but it compiles fine without the custom loader. Remove it for simplicity.
2022-09-09Simplify the implementation of `rustc_queries`Joshua Nelson-35/+18
2022-09-09Make the `storage` query modifier less generalJoshua Nelson-63/+59
In practice, it was only ever used with `ArenaCacheSelector`. Change it to a single boolean `arena_cache` rather than allowing queries to specify an arbitrary type.
2022-09-09Auto merge of #101611 - GuillaumeGomez:rollup-yw3qtug, r=GuillaumeGomezbors-580/+244
Rollup of 5 pull requests Successful merges: - #101475 (Use futex-based locks and thread parker on Hermit) - #101492 (Suggest adding array lengths to references to arrays if possible) - #101495 (Compile spin_loop_hint as pause on x86 even without sse2 enabled) - #101529 (Fix the example code and doctest for Formatter::sign_plus) - #101600 (rustdoc: simplify the codeblock tooltip) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-09Rollup merge of #101600 - notriddle:notriddle/li, r=GuillaumeGomezGuillaume Gomez-83/+61
rustdoc: simplify the codeblock tooltip **https://github.com/rust-lang/rust/pull/101593 needs merged first** This PR moves the tooltip into example-wrap, simplifying several overly-complex aspects of how these tooltips work: * The mousover javascript can be removed, because hovering example-wrap can style the tooltip inside. * The sibling selecor can be removed, because hovering the tooltip also hovers the wrapper, which can hover the codeblock itself. * The relative positioning of the `<li>` tag, which was added in https://github.com/rust-lang/rust/commit/e861efd9f9ca45c1048a256812dfe8faffbb1367 to fix the positioning of the code tooltip, can now be removed, because example-wrap itself already has relative positioning.
2022-09-09Rollup merge of #101529 - mousetail:patch-2, r=thomccGuillaume Gomez-1/+2
Fix the example code and doctest for Formatter::sign_plus The provided example to the `sign_plus` method on `fmt` was broken, it displays the `-` sign twice for negative numbers. This pull request should fix the issue by `.abs()` ing the number so that the negative sign appears only once. It is just one possible solution to the issue, not sure if it's the best. However, this one will behave as expected when combined with fill and alignment operators.
2022-09-09Rollup merge of #101495 - bjorn3:pause-no-sse2, r=Mark-SimulacrumGuillaume Gomez-11/+8
Compile spin_loop_hint as pause on x86 even without sse2 enabled The x86 `pause` instruction was introduced with sse2, but because it is encoded as `rep nop`, it works just fine on cpu's without sse2 support. It just doesn't do anything.
2022-09-09Rollup merge of #101492 - ↵Guillaume Gomez-29/+120
TaKO8Ki:suggest-adding-array-length-to-ref-to-array, r=oli-obk Suggest adding array lengths to references to arrays if possible ref: https://github.com/rust-lang/rust/pull/100590#pullrequestreview-1096851146
2022-09-09Rollup merge of #101475 - joboet:hermit_futex_locks, r=m-ou-seGuillaume Gomez-456/+53
Use futex-based locks and thread parker on Hermit [Hermit now has futex syscalls](https://github.com/hermitcore/libhermit-rs/pull/534), which means Hermit can share the well-tested and performant locks and thread parker used on Linux. Ping `@mkroening,` `@stlankes` r? `@m-ou-se`
2022-09-09rustdoc: simplify the codeblock tooltipMichael Howell-83/+61
This commit moves the tooltip into example-wrap, simplifying allowing several overly-complex things to be fixed: * The mousover javascript can be removed, because hovering example-wrap can style the tooltip inside. * The sibling selecor can be removed, because hovering the tooltip also hovers the wrapper, which can hover the codeblock itself. * The relative positioning of the `<li>` tag, which was added in e861efd9f9ca45c1048a256812dfe8faffbb1367 to fix the positioning of the code tooltip, can now be removed, because example-wrap itself already has relative positioning.
2022-09-09std: use futex-based locks and thread parker on Hermitjoboet-456/+53
2022-09-09Auto merge of #101527 - Kobzol:ci-update-llvm, r=Mark-Simulacrumbors-1/+1
Update LLVM used in x86 CI dist builds to `15.0.0` LLVM 15.0.0 has been released, so we can use it in CI builds. We need (at least) LLVM 15 for BOLT, and we regularly update to most recent stable versions. It would also be good to first see the perf. effect of upgrading by itself, to have a better baseline for BOLT. r? `@Mark-Simulacrum`
2022-09-09Auto merge of #101603 - matthiaskrgr:rollup-8y6kf20, r=matthiaskrgrbors-199/+269
Rollup of 6 pull requests Successful merges: - #99207 (Enable eager checks for memory sanitizer) - #101253 (fix the suggestion of format for asm_sub_register) - #101450 (Add `const_extern_fn` to 1.62 release notes.) - #101556 (Tweak future opaque ty pretty printing) - #101563 (Link UEFI target documentation from target list) - #101593 (Cleanup themes (tooltip)) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-09Rollup merge of #101593 - GuillaumeGomez:cleanup-theme-tooltip, r=notriddleMatthias Krüger-146/+152
Cleanup themes (tooltip) No changes in the UI. I used this opportunity to unify the dark theme with the others for the alpha parameter though. r? `@notriddle`
2022-09-09Rollup merge of #101563 - sanxiyn:doc-link-uefi, r=ehussMatthias Krüger-3/+3
Link UEFI target documentation from target list #99760 added UEFI target documentation, but forgot to link it from the main target list.
2022-09-09Rollup merge of #101556 - compiler-errors:tweak-generator-print, r=jackh726Matthias Krüger-7/+7
Tweak future opaque ty pretty printing 1. The `Return` type of a generator doesn't need to be a lang item just for diagnostic printing of types 2. We shouldn't suppress the `Output = Ty` of a opaque future if the type is a int or float var.
2022-09-09Rollup merge of #101450 - ehuss:relnotes-95346, r=Mark-SimulacrumMatthias Krüger-0/+2
Add `const_extern_fn` to 1.62 release notes. Adds #95346 which did not get tagged with relnotes. Closes #101443
2022-09-09Rollup merge of #101253 - lyming2007:issue-101163, r=AmanieuMatthias Krüger-38/+38
fix the suggestion of format for asm_sub_register modified: compiler/rustc_typeck/src/check/intrinsicck.rs modified: src/test/ui/asm/bad-template.aarch64_mirunsafeck.stderr modified: src/test/ui/asm/bad-template.aarch64_thirunsafeck.stderr modified: src/test/ui/asm/bad-template.x86_64_mirunsafeck.stderr modified: src/test/ui/asm/bad-template.x86_64_thirunsafeck.stderr modified: src/test/ui/asm/type-check-1.rs modified: src/test/ui/asm/type-check-1.stderr modified: src/test/ui/asm/x86_64/type-check-3.stderr
2022-09-09Rollup merge of #99207 - 5225225:msan-eager-checks, r=jackh726Matthias Krüger-5/+67
Enable eager checks for memory sanitizer Fixes #99179
2022-09-09Auto merge of #101224 - compiler-errors:rpitit, r=oli-obkbors-304/+1078
Initial implementation of return-position `impl Trait` in traits * Create a new item kind, called `ImplTraitPlaceholder`, which is used to lower `ast::TyKind::ImplTrait` in trait method returns. * This item is the child of the trait method, which simplifies the way we calculate bounds and stuff. * Use the def-id of this type to construct a projection type that we use during astconv for the return type of the trait method signature. * Implement logic to normalize this `ImplTraitPlaceholder` projection type when we know its concrete impl (this is pretty limited currently, but really there are no other selection candidates that make sense -- for now!) * Check that the `impl Trait`'s bounds are satisfied on the concrete type provided in the impl. This is obviously nowhere near complete, but I wanted to at least get some initial support landed so we can start playing around with it. What works: * async fn in trait and RPITIT, including multiple `impl Trait`s and `impl Trait` nested in associated type bindings, like `impl Future<Output = impl Sized>`
2022-09-09Fix documentation lint failuresMichael Goulet-2/+2
2022-09-09Adjust pretty printing of RPITITsMichael Goulet-11/+31
2022-09-09Rebase falloutMichael Goulet-11/+8
2022-09-09Appease clippy againMichael Goulet-17/+16
2022-09-09Tweak feature error, add testMichael Goulet-9/+52
2022-09-09Handle generic parameters.Camille GILLOT-223/+170
2022-09-09Deeply check that method signatures match, and allow for nested RPITITsMichael Goulet-52/+231
2022-09-09Bless tests, fix ICE with ImplTraitPlaceholderMichael Goulet-192/+245
2022-09-09Address nitsMichael Goulet-7/+9
2022-09-09Address rebase issues, make async fn in trait workMichael Goulet-19/+89
2022-09-09Make async fn in traits workMichael Goulet-41/+46
2022-09-09Make clippy happyMichael Goulet-2/+7
2022-09-09Add testsMichael Goulet-0/+140
2022-09-09Check that impl types actually satisfy RPITIT boundsMichael Goulet-0/+24
2022-09-09Rustdoc supportMichael Goulet-2/+14
2022-09-09Implement projection for ImplTraitPlaceholderMichael Goulet-1/+120
2022-09-09Lower RPITIT to ImplTraitPlaceholder itemMichael Goulet-8/+99
2022-09-09RPITIT placeholder itemsMichael Goulet-2/+70
2022-09-09Auto merge of #93873 - Stovent:big-ints, r=m-ou-sebors-0/+127
Reimplement `carrying_add` and `borrowing_sub` for signed integers. As per the discussion in #85532, this PR reimplements `carrying_add` and `borrowing_sub` for signed integers. It also adds unit tests for both unsigned and signed integers, emphasing on the behaviours of the methods.
2022-09-09Add gui test for codeblocks tooltip colorsGuillaume Gomez-0/+96
2022-09-09Clean up themes a bit moreGuillaume Gomez-146/+56
2022-09-08Auto merge of #101592 - compiler-errors:rollup-d2fya7z, r=compiler-errorsbors-39/+60
Rollup of 7 pull requests Successful merges: - #101423 (Fix hermit warnings) - #101499 (Introduce lowering_arena to avoid creating AST nodes on the fly) - #101530 (llvm-wrapper: adapt for LLVM API changes) - #101554 (rustdoc: remove unused CSS `#implementations-list > h3 > span.in-band`) - #101580 (rustdoc: remove unused CSS `div.impl-items > div`) - #101584 (rustdoc: remove no-op CSS `#settings-menu { padding: 0 }`) - #101587 (Make `Debug` impl for `Term` useful) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-08Rollup merge of #101587 - BoxyUwU:term_debug, r=compiler-errorsMichael Goulet-1/+14
Make `Debug` impl for `Term` useful because `Term { ptr: 78942378998734298342, maker: PhantomData, }` does not excel at communicating the necessary information
2022-09-08Rollup merge of #101584 - notriddle:notriddle/settings-menu, r=GuillaumeGomezMichael Goulet-3/+1
rustdoc: remove no-op CSS `#settings-menu { padding: 0 }` This CSS was added in 5e01ba36c9f1037c4cf3e7421413fc6c41f85d05, and served to override CSS right above it that set a 5px padding for several kinds of buttons in the same toolbar: https://github.com/rust-lang/rust/blob/5e01ba36c9f1037c4cf3e7421413fc6c41f85d05/src/librustdoc/html/static/css/rustdoc.css#L1400-L1409 The CSS that it overrode is still there, but now it only applies to `#settings-menu > a`, so there's nothing to override. https://github.com/rust-lang/rust/blob/24d69920201563f0ee7b530f1cda0f171b205cc2/src/librustdoc/html/static/css/rustdoc.css#L1445-L1454
2022-09-08Rollup merge of #101580 - notriddle:notriddle/div-impl-items-div, ↵Michael Goulet-5/+0
r=GuillaumeGomez rustdoc: remove unused CSS `div.impl-items > div` This was added in 9077d540da944c41678a7129e04e7fc5d7e38582 to override the style on `<div>` tags that were acting as headers. These `<div>` tags were replaced with `<section>` tags in 32f62607c3142dfc9eb56a0bd72dee298ca43358, but this CSS was probably already redundant even then (the headers had already been replaced with real `<h3>` and `<h4>` tags in 76a3b609d0b93c5d8da5e4e3db37bd03e5cb1c30).