Commit Graph

199688 Commits

Author SHA1 Message Date
Michael Howell
56e9ec547a rustdoc: implement glob shadowing when doing local inlining 2022-09-09 18:04:27 -07:00
Nixon Enraght-Moony
5634b26ed6 Rustdoc-Json Tests: Use @is and @ismany more often. 2022-09-10 01:30:47 +01:00
Nixon Enraght-Moony
2c17099671 Rustdoc-Json: Correcty handle intra-doc-links to items without HTML page
Closes #101531
2022-09-10 00:40:30 +01:00
bors
395e56f398 Auto merge of #101617 - Dylan-DPC:rollup-iiy4ipc, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #101366 (Restore old behaviour on broken UNC paths)
 - #101492 (Suggest adding array lengths to references to arrays if possible)
 - #101529 (Fix the example code and doctest for Formatter::sign_plus)
 - #101573 (update `ParamKindOrd`)
 - #101612 (Fix code generation of `Rvalue::Repeat` with 128 bit values)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-09 23:06:40 +00:00
Daniel Paoliello
c7475011a3 Stabilze raw-dylib for non-x86 2022-09-09 15:38:15 -07:00
Michael Howell
624f972358 rustdoc: when removing duplicate names, ignore #[doc(hidden)] items 2022-09-09 15:02:28 -07:00
bors
1d37ed661a Auto merge of #101611 - GuillaumeGomez:rollup-yw3qtug, r=GuillaumeGomez
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-09 20:43:13 +00:00
Michael Howell
1f8d552d6d rustdoc: avoid cleaning modules with duplicate names 2022-09-09 13:05:08 -07:00
Nicholas Bishop
54d9ba8239 Use RelocModel::Pic for UEFI targets
In https://github.com/rust-lang/rust/pull/100537, the relocation model
for UEFI targets was changed from PIC (the default value) to
static. There was some dicussion of this change here:
https://github.com/rust-lang/rust/pull/100537#discussion_r952363012

It turns out that this can cause compilation to fail as described in
https://github.com/rust-lang/rust/issues/101377, so switch back to PIC.

Fixes https://github.com/rust-lang/rust/issues/101377
2022-09-09 15:26:19 -04:00
Michael Howell
0698ffbdb5 rustdoc: update test cases
Width changed by 2/4 pixels by b273c7502e
2022-09-09 11:48:43 -07:00
Michael Howell
b273c7502e rustdoc: remove unused CSS #search { position: relative }
This was added in 611d0e6cce, to allow its
child `#results` element to be absolutely positioned inside it. The
child stopped being absolute in 8c0469552e.

To keep the layout looking the same, the links need to not have
`width: 100%` any more, relying instead on the box naturally growing to
fit because it has `display: block`.
2022-09-09 10:35:18 -07:00
Dylan DPC
07a9c10fe6
Rollup merge of #101612 - tmiasko:repeat128, r=lcnr
Fix code generation of `Rvalue::Repeat` with 128 bit values

Closes #101585.
2022-09-09 22:02:19 +05:30
Dylan DPC
ae4973281b
Rollup merge of #101573 - lcnr:param-kind-ord, r=BoxyUwU
update `ParamKindOrd`

https://github.com/rust-lang/rust/pull/90207#discussion_r767160854 😁

writing comments "for future prs" sure works well :3

r? `@BoxyUwU`
2022-09-09 22:02:18 +05:30
Dylan DPC
fcdd5016c5
Rollup merge of #101529 - mousetail:patch-2, r=thomcc
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-09 22:02:17 +05:30
Dylan DPC
bef48f9314
Rollup merge of #101492 - 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-09 22:02:16 +05:30
Dylan DPC
d9609c7c26
Rollup merge of #101366 - ChrisDenton:unc-forward-slash, r=m-ou-se
Restore old behaviour on broken UNC paths

This fixes #101358 by restoring the behaviour from previous stable Rust versions. I'm not convinced this is ultimately right but I think it's less wrong and maybe this should be backported to beta?

r? libs
2022-09-09 22:02:16 +05:30
Tim Neumann
76aefbeddb relax msan error-pattern due to LLVM changes 2022-09-09 16:15:08 +00:00
Michael Goulet
022e3fe550 Equate fn outputs when inferring RPITIT hidden types 2022-09-09 16:14:59 +00:00
Oli Scherer
f632dbe46f The <*const T>::guaranteed_* methods now return an option for the unknown case 2022-09-09 15:16:04 +00:00
Tomasz Miąsko
e4d3abfe77 Use memset when repeating 128bit zero value 2022-09-09 15:54:14 +02:00
Tomasz Miąsko
7279106166 Introduce a fallible variant of LLVMConstIntGetZExtValue
which verifies that a constant bit width is within 64 bits or fails.
2022-09-09 15:54:14 +02:00
Guillaume Gomez
2e258cec05
Rollup merge of #101600 - notriddle:notriddle/li, r=GuillaumeGomez
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 e861efd9f9 to fix the positioning of the code tooltip, can now be removed, because example-wrap itself already has relative positioning.
2022-09-09 15:36:38 +02:00
Guillaume Gomez
ff21ccfba1
Rollup merge of #101529 - mousetail:patch-2, r=thomcc
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-09 15:36:37 +02:00
Guillaume Gomez
3ec332fc82
Rollup merge of #101495 - bjorn3:pause-no-sse2, r=Mark-Simulacrum
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-09 15:36:36 +02:00
Guillaume Gomez
6102ff18ae
Rollup merge of #101492 - 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-09 15:36:35 +02:00
Guillaume Gomez
46dadd65cb
Rollup merge of #101475 - joboet:hermit_futex_locks, r=m-ou-se
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-09 15:36:34 +02:00
Michael Howell
cbcb74e939 rustdoc: simplify the codeblock tooltip
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
  e861efd9f9 to fix the positioning of the code
  tooltip, can now be removed, because example-wrap itself already has
  relative positioning.
2022-09-09 05:56:14 -07:00
lcnr
5db6907498 review 2022-09-09 14:28:57 +02:00
lcnr
c63020a7c3 rename codegen_fulfill_obligation 2022-09-09 13:36:27 +02:00
Philipp Krones
ce03f15bfd
Merge commit 'b52fb5234cd7c11ecfae51897a6f7fa52e8777fc' into clippyup 2022-09-09 13:36:26 +02:00
lcnr
14f2acd0ac resolve_instance: remove BoundVarsCollector 2022-09-09 13:08:07 +02:00
joboet
262193e044
std: use futex-based locks and thread parker on Hermit 2022-09-09 11:56:50 +02:00
Akhilesh Singhania
1933b74dbd
doc: fix minor typo 2022-09-09 11:30:40 +02:00
bors
98f3001eec Auto merge of #101527 - Kobzol:ci-update-llvm, r=Mark-Simulacrum
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-09 09:05:59 +00:00
bors
4a09adf99f Auto merge of #101603 - matthiaskrgr:rollup-8y6kf20, r=matthiaskrgr
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-09 06:24:25 +00:00
Matthias Krüger
8b78fa055e
Rollup merge of #101593 - GuillaumeGomez:cleanup-theme-tooltip, r=notriddle
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-09 07:02:34 +02:00
Matthias Krüger
1a61afda14
Rollup merge of #101563 - sanxiyn:doc-link-uefi, r=ehuss
Link UEFI target documentation from target list

#99760 added UEFI target documentation, but forgot to link it from the main target list.
2022-09-09 07:02:33 +02:00
Matthias Krüger
bdfbc3597b
Rollup merge of #101556 - compiler-errors:tweak-generator-print, r=jackh726
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-09 07:02:32 +02:00
Matthias Krüger
434591cd13
Rollup merge of #101450 - ehuss:relnotes-95346, r=Mark-Simulacrum
Add `const_extern_fn` to 1.62 release notes.

Adds #95346 which did not get tagged with relnotes.

Closes #101443
2022-09-09 07:02:31 +02:00
Matthias Krüger
0354eee4c6
Rollup merge of #101253 - lyming2007:issue-101163, r=Amanieu
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-09 07:02:30 +02:00
Matthias Krüger
6d2033512b
Rollup merge of #99207 - 5225225:msan-eager-checks, r=jackh726
Enable eager checks for memory sanitizer

Fixes #99179
2022-09-09 07:02:30 +02:00
bors
ab32548539 Auto merge of #101224 - compiler-errors:rpitit, r=oli-obk
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-09 03:40:17 +00:00
Michael Goulet
6876c94d80 Fix documentation lint failures 2022-09-09 01:31:46 +00:00
Michael Goulet
270b776ef9 Adjust pretty printing of RPITITs 2022-09-09 01:31:46 +00:00
Michael Goulet
ec170bef0d Rebase fallout 2022-09-09 01:31:46 +00:00
Michael Goulet
526511e86b Appease clippy again 2022-09-09 01:31:46 +00:00
Michael Goulet
55df9201fe Tweak feature error, add test 2022-09-09 01:31:46 +00:00
Camille GILLOT
05812df603 Handle generic parameters. 2022-09-09 01:31:46 +00:00
Michael Goulet
cdf78073c5 Deeply check that method signatures match, and allow for nested RPITITs 2022-09-09 01:31:46 +00:00
Michael Goulet
1f03edeabe Bless tests, fix ICE with ImplTraitPlaceholder 2022-09-09 01:31:45 +00:00