]> git.lizzy.rs Git - rust.git/log
rust.git
22 months agoRemove unused temp.
Camille Gillot [Sat, 10 Sep 2022 10:10:04 +0000 (12:10 +0200)]
Remove unused temp.

Co-authored-by: Wesley Wiser <wwiser@gmail.com>
22 months agoAuto merge of #101483 - oli-obk:guaranteed_opt, r=fee1-dead
bors [Sat, 10 Sep 2022 09:50:21 +0000 (09:50 +0000)]
Auto merge of #101483 - oli-obk:guaranteed_opt, r=fee1-dead

The `<*const T>::guaranteed_*` methods now return an option for the unknown case

cc https://github.com/rust-lang/rust/issues/53020#issuecomment-1236932443

I chose `0` for "not equal" and `1` for "equal" and left `2` for the unknown case so backends can just forward to raw pointer equality and it works ✨

r? `@fee1-dead` or `@lcnr`

cc `@rust-lang/wg-const-eval`

22 months agorustc_error, rustc_private, rustc_ast: Switch to stable hash containers
Niklas Jonsson [Sat, 16 Jul 2022 13:16:57 +0000 (15:16 +0200)]
rustc_error, rustc_private, rustc_ast: Switch to stable hash containers

22 months agoUpdate browser-ui-test version to 0.9.8
Guillaume Gomez [Sat, 10 Sep 2022 08:26:47 +0000 (10:26 +0200)]
Update browser-ui-test version to 0.9.8

22 months agoUpdate rustdoc GUI tests
Guillaume Gomez [Fri, 9 Sep 2022 14:18:22 +0000 (16:18 +0200)]
Update rustdoc GUI tests

22 months agoSimplify DOM for codeblocks tooltips
Guillaume Gomez [Fri, 9 Sep 2022 14:18:14 +0000 (16:18 +0200)]
Simplify DOM for codeblocks tooltips

22 months agoAuto merge of #101639 - matthiaskrgr:rollup-sewkrgm, r=matthiaskrgr
bors [Sat, 10 Sep 2022 06:55:37 +0000 (06:55 +0000)]
Auto merge of #101639 - matthiaskrgr:rollup-sewkrgm, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #101413 (Use RelocModel::Pic for UEFI targets)
 - #101595 (Fix ICE report flags display.)
 - #101616 (Adapt test for msan message change)
 - #101624 (rustdoc: remove unused CSS `#search { position: relative }`)
 - #101633 (Rustdoc-Json: Correcty handle intra-doc-links to items without HTML page)
 - #101634 (Rustdoc-Json Tests: Use ``@is`` and ``@ismany`` more often.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

22 months agoRollup merge of #101634 - aDotInTheVoid:rdj-test, r=CraftSpider
Matthias Krüger [Sat, 10 Sep 2022 05:09:23 +0000 (07:09 +0200)]
Rollup merge of #101634 - aDotInTheVoid:rdj-test, r=CraftSpider

Rustdoc-Json Tests: Use `@is` and `@ismany` more often.

22 months agoRollup merge of #101633 - aDotInTheVoid:rdj-idl, r=jyn514
Matthias Krüger [Sat, 10 Sep 2022 05:09:22 +0000 (07:09 +0200)]
Rollup merge of #101633 - aDotInTheVoid:rdj-idl, r=jyn514

Rustdoc-Json: Correcty handle intra-doc-links to items without HTML page

Closes #101531

I renamed the `did` field in `ItemLink ` to more accurately describe what it does.

r? `@jyn514`

22 months agoRollup merge of #101624 - notriddle:notriddle/search, r=GuillaumeGomez
Matthias Krüger [Sat, 10 Sep 2022 05:09:21 +0000 (07:09 +0200)]
Rollup merge of #101624 - notriddle:notriddle/search, r=GuillaumeGomez

rustdoc: remove unused CSS `#search { position: relative }`

This was added in 611d0e6ccef8b60fa86ff5aa8fe3571cd36c444a, to allow its child `#results` element to be absolutely positioned inside it. The child stopped being absolute in 8c0469552e879f6319f8f96db660bab9eae1de5c.

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`.

22 months agoRollup merge of #101616 - TimNN:relax-msan, r=lqd
Matthias Krüger [Sat, 10 Sep 2022 05:09:21 +0000 (07:09 +0200)]
Rollup merge of #101616 - TimNN:relax-msan, r=lqd

Adapt test for msan message change

Similar to rust-lang/rust#100445, this adapts the new test added by rust-lang/rust#99207 to some relatively recent [LLVM changes](https://github.com/llvm/llvm-project/commit/057cabd997aeaef136e1e14f2ee645bd5bb197dd) that removed the function name from msan messages.

Found via our experimental rust + llvm @ HEAD bot:
https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/13347#018321b2-0cc3-4c91-b4db-774477e8b074

`@rustbot` label +llvm-main

22 months agoRollup merge of #101595 - ehuss:fix-ice-flag-report, r=tmiasko
Matthias Krüger [Sat, 10 Sep 2022 05:09:20 +0000 (07:09 +0200)]
Rollup merge of #101595 - ehuss:fix-ice-flag-report, r=tmiasko

Fix ICE report flags display.

#92310 made some changes to the ICE report that displays the rustc flags, but it introduced a bug where a flag like `-Z incremental-verify-ich=yes` was being treated as-if it was `-Cincremental`. This corrupted the output and made it confusing. The cause was using `starts_with` instead of properly splitting the option.

For example, with the command like `rustc foo.rs -Cincremental=/tmp/a -Zincremental-verify-ich=yes --crate-type lib` would previously look like:

```
note: compiler flags: -C incremental -Z incremental --crate-type lib
```

It now looks like:

```
note: compiler flags: -C incremental=[REDACTED] -Z incremental-verify-ich=yes --crate-type lib
```

I added a `[REDACTED]` marker for `-Cincremental` so it is a little less confusing that a value has been removed.

Fixes #101588

22 months agoRollup merge of #101413 - nicholasbishop:bishop-remove-uefi-static-reloc, r=petrochenkov
Matthias Krüger [Sat, 10 Sep 2022 05:09:19 +0000 (07:09 +0200)]
Rollup merge of #101413 - nicholasbishop:bishop-remove-uefi-static-reloc, r=petrochenkov

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

22 months agoAuto merge of #99916 - dpaoliello:stablizerawdylib, r=wesleywiser
bors [Sat, 10 Sep 2022 04:14:34 +0000 (04:14 +0000)]
Auto merge of #99916 - dpaoliello:stablizerawdylib, r=wesleywiser

Stabilize raw-dylib for non-x86

This stabilizes the `raw-dylib` and `link_ordinal` features (#58713) for non-x86 architectures (i.e., `x86_64`, `aarch64` and `thumbv7a`):
* Marked the `raw_dylib` feature as `active`.
* Marked the `link_ordinal` attribute as `ungated`.
* Added new errors if either feature is used on x86 targets without the `raw_dylib` feature being enabled.
* Updated tests to only set the `raw_dylib` feature when building for x86.

22 months agoAuto merge of #101609 - flip1995:clippyup, r=Manishearth
bors [Sat, 10 Sep 2022 01:51:24 +0000 (01:51 +0000)]
Auto merge of #101609 - flip1995:clippyup, r=Manishearth

Update Clippy

r? `@Manishearth`

22 months agorustdoc: add another test case for glob shadowing
Michael Howell [Sat, 10 Sep 2022 01:13:31 +0000 (18:13 -0700)]
rustdoc: add another test case for glob shadowing

22 months agorustdoc: test cases for glob shadowing
Michael Howell [Sat, 10 Sep 2022 01:04:47 +0000 (18:04 -0700)]
rustdoc: test cases for glob shadowing

22 months agorustdoc: implement glob shadowing when doing local inlining
Michael Howell [Sat, 10 Sep 2022 01:04:27 +0000 (18:04 -0700)]
rustdoc: implement glob shadowing when doing local inlining

22 months agoRustdoc-Json Tests: Use `@is` and `@ismany` more often.
Nixon Enraght-Moony [Sat, 10 Sep 2022 00:30:47 +0000 (01:30 +0100)]
Rustdoc-Json Tests: Use `@is` and `@ismany` more often.

22 months agoRustdoc-Json: Correcty handle intra-doc-links to items without HTML page
Nixon Enraght-Moony [Fri, 9 Sep 2022 23:04:10 +0000 (00:04 +0100)]
Rustdoc-Json: Correcty handle intra-doc-links to items without HTML page

Closes #101531

22 months agoAuto merge of #101617 - Dylan-DPC:rollup-iiy4ipc, r=Dylan-DPC
bors [Fri, 9 Sep 2022 23:06:40 +0000 (23:06 +0000)]
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

22 months agoStabilze raw-dylib for non-x86
Daniel Paoliello [Fri, 29 Jul 2022 18:18:07 +0000 (11:18 -0700)]
Stabilze raw-dylib for non-x86

22 months agorustdoc: when removing duplicate names, ignore `#[doc(hidden)]` items
Michael Howell [Fri, 9 Sep 2022 22:02:28 +0000 (15:02 -0700)]
rustdoc: when removing duplicate names, ignore `#[doc(hidden)]` items

22 months agoAuto merge of #101611 - GuillaumeGomez:rollup-yw3qtug, r=GuillaumeGomez
bors [Fri, 9 Sep 2022 20:43:13 +0000 (20:43 +0000)]
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

22 months agorustdoc: avoid cleaning modules with duplicate names
Michael Howell [Fri, 9 Sep 2022 19:58:42 +0000 (12:58 -0700)]
rustdoc: avoid cleaning modules with duplicate names

22 months agoUse RelocModel::Pic for UEFI targets
Nicholas Bishop [Sun, 4 Sep 2022 16:42:03 +0000 (12:42 -0400)]
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

22 months agorustdoc: update test cases
Michael Howell [Fri, 9 Sep 2022 18:48:43 +0000 (11:48 -0700)]
rustdoc: update test cases

Width changed by 2/4 pixels by b273c7502e363baeec293b972f671070e80f1391

22 months agorustdoc: remove unused CSS `#search { position: relative }`
Michael Howell [Fri, 9 Sep 2022 17:09:01 +0000 (10:09 -0700)]
rustdoc: remove unused CSS `#search { position: relative }`

This was added in 611d0e6ccef8b60fa86ff5aa8fe3571cd36c444a, to allow its
child `#results` element to be absolutely positioned inside it. The
child stopped being absolute in 8c0469552e879f6319f8f96db660bab9eae1de5c.

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`.

22 months agoRollup merge of #101612 - tmiasko:repeat128, r=lcnr
Dylan DPC [Fri, 9 Sep 2022 16:32:19 +0000 (22:02 +0530)]
Rollup merge of #101612 - tmiasko:repeat128, r=lcnr

Fix code generation of `Rvalue::Repeat` with 128 bit values

Closes #101585.

22 months agoRollup merge of #101573 - lcnr:param-kind-ord, r=BoxyUwU
Dylan DPC [Fri, 9 Sep 2022 16:32:18 +0000 (22:02 +0530)]
Rollup merge of #101573 - lcnr:param-kind-ord, r=BoxyUwU

update `ParamKindOrd`

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

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

r? `@BoxyUwU`

22 months agoRollup merge of #101529 - mousetail:patch-2, r=thomcc
Dylan DPC [Fri, 9 Sep 2022 16:32:17 +0000 (22:02 +0530)]
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.

22 months agoRollup merge of #101492 - TaKO8Ki:suggest-adding-array-length-to-ref-to-array, r...
Dylan DPC [Fri, 9 Sep 2022 16:32:16 +0000 (22:02 +0530)]
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

22 months agoRollup merge of #101366 - ChrisDenton:unc-forward-slash, r=m-ou-se
Dylan DPC [Fri, 9 Sep 2022 16:32:16 +0000 (22:02 +0530)]
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

22 months agorelax msan error-pattern due to LLVM changes
Tim Neumann [Fri, 9 Sep 2022 16:15:08 +0000 (16:15 +0000)]
relax msan error-pattern due to LLVM changes

22 months agoEquate fn outputs when inferring RPITIT hidden types
Michael Goulet [Fri, 9 Sep 2022 14:59:54 +0000 (14:59 +0000)]
Equate fn outputs when inferring RPITIT hidden types

22 months agoThe `<*const T>::guaranteed_*` methods now return an option for the unknown case
Oli Scherer [Tue, 6 Sep 2022 14:08:59 +0000 (14:08 +0000)]
The `<*const T>::guaranteed_*` methods now return an option for the unknown case

22 months agoAdd inline-llvm option for disabling/enabling LLVM inlining
Yan Chen [Mon, 8 Aug 2022 23:58:27 +0000 (16:58 -0700)]
Add inline-llvm option for disabling/enabling LLVM inlining

22 months agoUse memset when repeating 128bit zero value
Tomasz Miąsko [Fri, 9 Sep 2022 00:00:00 +0000 (00:00 +0000)]
Use memset when repeating 128bit zero value

22 months agoIntroduce a fallible variant of LLVMConstIntGetZExtValue
Tomasz Miąsko [Fri, 9 Sep 2022 00:00:00 +0000 (00:00 +0000)]
Introduce a fallible variant of LLVMConstIntGetZExtValue

which verifies that a constant bit width is within 64 bits or fails.

22 months agoRollup merge of #101600 - notriddle:notriddle/li, r=GuillaumeGomez
Guillaume Gomez [Fri, 9 Sep 2022 13:36:38 +0000 (15:36 +0200)]
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 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.

22 months agoRollup merge of #101529 - mousetail:patch-2, r=thomcc
Guillaume Gomez [Fri, 9 Sep 2022 13:36:37 +0000 (15:36 +0200)]
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.

22 months agoRollup merge of #101495 - bjorn3:pause-no-sse2, r=Mark-Simulacrum
Guillaume Gomez [Fri, 9 Sep 2022 13:36:36 +0000 (15:36 +0200)]
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.

22 months agoRollup merge of #101492 - TaKO8Ki:suggest-adding-array-length-to-ref-to-array, r...
Guillaume Gomez [Fri, 9 Sep 2022 13:36:35 +0000 (15:36 +0200)]
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

22 months agoRollup merge of #101475 - joboet:hermit_futex_locks, r=m-ou-se
Guillaume Gomez [Fri, 9 Sep 2022 13:36:34 +0000 (15:36 +0200)]
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`

22 months agorustdoc: simplify the codeblock tooltip
Michael Howell [Fri, 9 Sep 2022 00:46:57 +0000 (17:46 -0700)]
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
  e861efd9f9ca45c1048a256812dfe8faffbb1367 to fix the positioning of the code
  tooltip, can now be removed, because example-wrap itself already has
  relative positioning.

22 months agoreview
lcnr [Fri, 9 Sep 2022 12:28:57 +0000 (14:28 +0200)]
review

22 months agorename `codegen_fulfill_obligation`
lcnr [Fri, 9 Sep 2022 11:36:27 +0000 (13:36 +0200)]
rename `codegen_fulfill_obligation`

22 months agoMerge commit 'b52fb5234cd7c11ecfae51897a6f7fa52e8777fc' into clippyup
Philipp Krones [Fri, 9 Sep 2022 11:36:26 +0000 (13:36 +0200)]
Merge commit 'b52fb5234cd7c11ecfae51897a6f7fa52e8777fc' into clippyup

22 months ago`resolve_instance`: remove `BoundVarsCollector`
lcnr [Thu, 8 Sep 2022 15:02:09 +0000 (17:02 +0200)]
`resolve_instance`: remove `BoundVarsCollector`

22 months agostd: use futex-based locks and thread parker on Hermit
joboet [Tue, 6 Sep 2022 08:44:05 +0000 (10:44 +0200)]
std: use futex-based locks and thread parker on Hermit

22 months agodoc: fix minor typo
Akhilesh Singhania [Fri, 9 Sep 2022 09:30:40 +0000 (11:30 +0200)]
doc: fix minor typo

22 months agoAuto merge of #101527 - Kobzol:ci-update-llvm, r=Mark-Simulacrum
bors [Fri, 9 Sep 2022 09:05:59 +0000 (09:05 +0000)]
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`

22 months agoAuto merge of #101603 - matthiaskrgr:rollup-8y6kf20, r=matthiaskrgr
bors [Fri, 9 Sep 2022 06:24:25 +0000 (06:24 +0000)]
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

22 months agoRollup merge of #101593 - GuillaumeGomez:cleanup-theme-tooltip, r=notriddle
Matthias Krüger [Fri, 9 Sep 2022 05:02:34 +0000 (07:02 +0200)]
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`

22 months agoRollup merge of #101563 - sanxiyn:doc-link-uefi, r=ehuss
Matthias Krüger [Fri, 9 Sep 2022 05:02:33 +0000 (07:02 +0200)]
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.

22 months agoRollup merge of #101556 - compiler-errors:tweak-generator-print, r=jackh726
Matthias Krüger [Fri, 9 Sep 2022 05:02:32 +0000 (07:02 +0200)]
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.

22 months agoRollup merge of #101450 - ehuss:relnotes-95346, r=Mark-Simulacrum
Matthias Krüger [Fri, 9 Sep 2022 05:02:31 +0000 (07:02 +0200)]
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

22 months agoRollup merge of #101253 - lyming2007:issue-101163, r=Amanieu
Matthias Krüger [Fri, 9 Sep 2022 05:02:30 +0000 (07:02 +0200)]
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

22 months agoRollup merge of #99207 - 5225225:msan-eager-checks, r=jackh726
Matthias Krüger [Fri, 9 Sep 2022 05:02:30 +0000 (07:02 +0200)]
Rollup merge of #99207 - 5225225:msan-eager-checks, r=jackh726

Enable eager checks for memory sanitizer

Fixes #99179

22 months agoAuto merge of #101224 - compiler-errors:rpitit, r=oli-obk
bors [Fri, 9 Sep 2022 03:40:17 +0000 (03:40 +0000)]
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>`

22 months agofix #101097, avoid infinite loop in fn arguments checking
chenyukang [Tue, 30 Aug 2022 02:03:02 +0000 (10:03 +0800)]
fix #101097, avoid infinite loop in fn arguments checking

22 months agoFix documentation lint failures
Michael Goulet [Fri, 9 Sep 2022 01:31:36 +0000 (01:31 +0000)]
Fix documentation lint failures

22 months agoAdjust pretty printing of RPITITs
Michael Goulet [Thu, 8 Sep 2022 00:45:09 +0000 (00:45 +0000)]
Adjust pretty printing of RPITITs

22 months agoRebase fallout
Michael Goulet [Thu, 8 Sep 2022 00:26:01 +0000 (00:26 +0000)]
Rebase fallout

22 months agoAppease clippy again
Michael Goulet [Tue, 6 Sep 2022 17:27:47 +0000 (17:27 +0000)]
Appease clippy again

22 months agoTweak feature error, add test
Michael Goulet [Tue, 6 Sep 2022 17:16:08 +0000 (17:16 +0000)]
Tweak feature error, add test

22 months agoHandle generic parameters.
Camille GILLOT [Tue, 6 Sep 2022 15:37:00 +0000 (17:37 +0200)]
Handle generic parameters.

22 months agoDeeply check that method signatures match, and allow for nested RPITITs
Michael Goulet [Fri, 2 Sep 2022 21:02:59 +0000 (21:02 +0000)]
Deeply check that method signatures match, and allow for nested RPITITs

22 months agoBless tests, fix ICE with ImplTraitPlaceholder
Michael Goulet [Fri, 2 Sep 2022 17:54:58 +0000 (17:54 +0000)]
Bless tests, fix ICE with ImplTraitPlaceholder

22 months agoAddress nits
Michael Goulet [Fri, 2 Sep 2022 16:55:24 +0000 (16:55 +0000)]
Address nits

22 months agoAddress rebase issues, make async fn in trait work
Michael Goulet [Fri, 2 Sep 2022 16:45:30 +0000 (16:45 +0000)]
Address rebase issues, make async fn in trait work

22 months agoMake async fn in traits work
Michael Goulet [Fri, 2 Sep 2022 15:57:31 +0000 (15:57 +0000)]
Make async fn in traits work

22 months agoMake clippy happy
Michael Goulet [Wed, 31 Aug 2022 05:29:36 +0000 (05:29 +0000)]
Make clippy happy

22 months agoAdd tests
Michael Goulet [Wed, 31 Aug 2022 04:46:54 +0000 (04:46 +0000)]
Add tests

22 months agoCheck that impl types actually satisfy RPITIT bounds
Michael Goulet [Wed, 31 Aug 2022 05:12:40 +0000 (05:12 +0000)]
Check that impl types actually satisfy RPITIT bounds

22 months agoRustdoc support
Michael Goulet [Wed, 31 Aug 2022 04:41:20 +0000 (04:41 +0000)]
Rustdoc support

22 months agoImplement projection for ImplTraitPlaceholder
Michael Goulet [Wed, 31 Aug 2022 04:41:16 +0000 (04:41 +0000)]
Implement projection for ImplTraitPlaceholder

22 months agoLower RPITIT to ImplTraitPlaceholder item
Michael Goulet [Wed, 31 Aug 2022 04:03:24 +0000 (04:03 +0000)]
Lower RPITIT to ImplTraitPlaceholder item

22 months agoRPITIT placeholder items
Michael Goulet [Wed, 31 Aug 2022 03:04:44 +0000 (03:04 +0000)]
RPITIT placeholder items

22 months agoAuto merge of #93873 - Stovent:big-ints, r=m-ou-se
bors [Fri, 9 Sep 2022 00:59:08 +0000 (00:59 +0000)]
Auto merge of #93873 - Stovent:big-ints, r=m-ou-se

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.

22 months agoCombine logic from lubs into lub_empty function
Jack Huey [Thu, 8 Sep 2022 22:36:55 +0000 (18:36 -0400)]
Combine logic from lubs into lub_empty function

22 months agoMake some functions pub(super)
Jack Huey [Sun, 26 Jun 2022 22:57:46 +0000 (18:57 -0400)]
Make some functions pub(super)

22 months agoRemove ReEmpty
Jack Huey [Sun, 26 Jun 2022 19:40:45 +0000 (15:40 -0400)]
Remove ReEmpty

22 months agoAuto merge of #9446 - mikerite:fix-9431-2, r=giraffate
bors [Thu, 8 Sep 2022 23:48:08 +0000 (23:48 +0000)]
Auto merge of #9446 - mikerite:fix-9431-2, r=giraffate

Fix `range_{plus,minus}_one` bad suggestions

Fixes #9431.

The current `range_plus_one` and `range_minus_one` suggestions are completely incorrect when macros are involved.

This commit resolves this by disabling the lints for any range expression that is expanded from a macro. The reasons for this are that it is very difficult to create a correct suggestion in this case and that false negatives are less important for pedantic lints.

changelog: Fix `range_{plus,minus}_one` bad suggestions

22 months agoFix ICE report flags display.
Eric Huss [Thu, 8 Sep 2022 23:08:53 +0000 (16:08 -0700)]
Fix ICE report flags display.

22 months agoAdd gui test for codeblocks tooltip colors
Guillaume Gomez [Thu, 8 Sep 2022 21:41:29 +0000 (23:41 +0200)]
Add gui test for codeblocks tooltip colors

22 months agoClean up themes a bit more
Guillaume Gomez [Thu, 8 Sep 2022 21:40:13 +0000 (23:40 +0200)]
Clean up themes a bit more

22 months agoDon't construct ReEmpty regions in resolve_var
Jack Huey [Sun, 26 Jun 2022 19:08:35 +0000 (15:08 -0400)]
Don't construct ReEmpty regions in resolve_var

22 months agoIn ReverseMapper, don't fallback to ReEmpty, instead ReStatic
Jack Huey [Sun, 26 Jun 2022 16:01:05 +0000 (12:01 -0400)]
In ReverseMapper, don't fallback to ReEmpty, instead ReStatic

22 months agoCreate VarValue::Empty
Jack Huey [Sun, 26 Jun 2022 04:10:07 +0000 (00:10 -0400)]
Create VarValue::Empty

22 months agoDon't use reempty as an implicit_outlives_region
Jack Huey [Sun, 19 Jun 2022 14:47:40 +0000 (10:47 -0400)]
Don't use reempty as an implicit_outlives_region

22 months agoAuto merge of #101592 - compiler-errors:rollup-d2fya7z, r=compiler-errors
bors [Thu, 8 Sep 2022 21:45:23 +0000 (21:45 +0000)]
Auto merge of #101592 - compiler-errors:rollup-d2fya7z, r=compiler-errors

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

22 months agoRollup merge of #101587 - BoxyUwU:term_debug, r=compiler-errors
Michael Goulet [Thu, 8 Sep 2022 21:41:13 +0000 (14:41 -0700)]
Rollup merge of #101587 - BoxyUwU:term_debug, r=compiler-errors

Make `Debug` impl for `Term` useful

because `Term { ptr: 78942378998734298342, maker: PhantomData, }` does not excel at communicating the necessary information

22 months agoRollup merge of #101584 - notriddle:notriddle/settings-menu, r=GuillaumeGomez
Michael Goulet [Thu, 8 Sep 2022 21:41:12 +0000 (14:41 -0700)]
Rollup merge of #101584 - notriddle:notriddle/settings-menu, r=GuillaumeGomez

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

22 months agoRollup merge of #101580 - notriddle:notriddle/div-impl-items-div, r=GuillaumeGomez
Michael Goulet [Thu, 8 Sep 2022 21:41:11 +0000 (14:41 -0700)]
Rollup merge of #101580 - notriddle:notriddle/div-impl-items-div, 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).

22 months agoRollup merge of #101554 - notriddle:notriddle/implemenation-list-h3-span-in-band...
Michael Goulet [Thu, 8 Sep 2022 21:41:10 +0000 (14:41 -0700)]
Rollup merge of #101554 - notriddle:notriddle/implemenation-list-h3-span-in-band, r=Dylan-DPC

rustdoc: remove unused CSS `#implementations-list > h3 > span.in-band`

This was added in 51f26acaea46afd630fbab4ca441748802d20670 to help with the display of an `<h3>` tag that has a `<span class='in-band'>` inside.

The way implementation lists were rendered was changed in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9 to have `<code class='in-band'>`, making this CSS unused.

Then it was turned into a `<div>` in 9077d540da944c41678a7129e04e7fc5d7e38582 without issue.

Finally, the header itself acquired the `in-band` class in 76a3b609d0b93c5d8da5e4e3db37bd03e5cb1c30.

22 months agoRollup merge of #101530 - krasimirgg:llvm-16-up, r=cuviper
Michael Goulet [Thu, 8 Sep 2022 21:41:09 +0000 (14:41 -0700)]
Rollup merge of #101530 - krasimirgg:llvm-16-up, r=cuviper

llvm-wrapper: adapt for LLVM API changes

No functional changes intended.

Adapts PassWrapper for a few recent LLVM API changes:
* https://github.com/llvm/llvm-project/commit/e7bac3b9fa739f8d167a390a547068aad1d424a7
* https://github.com/llvm/llvm-project/commit/93600eb50ceeec83c488ded24fa0fd25f997fec6
* https://github.com/llvm/llvm-project/commit/5e38b2a456df6e263a509af60a731cec57310498

Note that `ModuleMemorySanitizerPass` was renamed back to its pre-14 name, `MemorySanitizerPass`, hence the funky `#if LLVM_VERSION_GE(14, 0) && LLVM_VERSION_LT(16, 0)` guard.

Found via our experimental rust + llvm at HEAD bot: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/13290#018315e6-24e1-44c8-b56d-9aad9be11c29

22 months agoRollup merge of #101499 - spastorino:add-lowering-arena, r=oli-obk
Michael Goulet [Thu, 8 Sep 2022 21:41:08 +0000 (14:41 -0700)]
Rollup merge of #101499 - spastorino:add-lowering-arena, r=oli-obk

Introduce lowering_arena to avoid creating AST nodes on the fly

`@oli-obk` requested this and other changes as a way of simplifying https://github.com/rust-lang/rust/pull/101345. This is just going to make the diff of https://github.com/rust-lang/rust/pull/101345 smaller.

r? `@oli-obk` `@cjgillot`

22 months agoRollup merge of #101423 - mkroening:hermit-warnings, r=sanxiyn
Michael Goulet [Thu, 8 Sep 2022 21:41:08 +0000 (14:41 -0700)]
Rollup merge of #101423 - mkroening:hermit-warnings, r=sanxiyn

Fix hermit warnings

This fixes two `unused_imprt` and one `dead_code` warning for hermit.

22 months agoptr: 43276834268743978
Ellen [Thu, 8 Sep 2022 20:09:23 +0000 (21:09 +0100)]
ptr: 43276834268743978