Commit Graph

236684 Commits

Author SHA1 Message Date
Ralf Jung
f3863294a8 intptrcast: only find strictly in-bounds pointers when we are not hitting the base address 2023-10-19 22:15:59 +02:00
bors
5d62040fb6 Auto merge of #3130 - RalfJung:rustup, r=RalfJung
Rustup
2023-10-19 19:28:48 +00:00
Ralf Jung
b01c480181 fmt 2023-10-19 21:26:38 +02:00
bors
214b4d91bd Auto merge of #115214 - Urgau:rfc-3127-trim-paths, r=compiler-errors
Implement rustc part of RFC 3127 trim-paths

This PR implements (or at least tries to) [RFC 3127 trim-paths](https://github.com/rust-lang/rust/issues/111540), the rustc part. That is `-Zremap-path-scope` with all of it's components/scopes.

`@rustbot` label: +F-trim-paths
2023-10-19 19:09:29 +00:00
bors
94c4e5c411 Auto merge of #115214 - Urgau:rfc-3127-trim-paths, r=compiler-errors
Implement rustc part of RFC 3127 trim-paths

This PR implements (or at least tries to) [RFC 3127 trim-paths](https://github.com/rust-lang/rust/issues/111540), the rustc part. That is `-Zremap-path-scope` with all of it's components/scopes.

`@rustbot` label: +F-trim-paths
2023-10-19 19:09:29 +00:00
bors
e76cb8c498 Auto merge of #116810 - cjgillot:mir-opt-check, r=oli-obk
Add FileCheck annotations to mir-opt tests.

This PR makes compiletest run LLVM `FileCheck` tool on mir-opt tests.

The check is *run by default*, except if disabled using `// skip-filecheck` comment. This ensures that we do not have a silently broken test. For now, the check is only run on the output of `--emit=mir`, ie. on PreCodegen MIR.

I give an example on `reference_prop.rs`.

r? `@oli-obk`
cc `@RalfJung`

Fixes https://github.com/rust-lang/rust/issues/85180
2023-10-19 16:53:52 +00:00
Michael Goulet
e8e9f6a32a Uplift movability and mutability, the simple way 2023-10-19 16:42:58 +00:00
Ralf Jung
d5d8a515ce Merge from rustc 2023-10-19 17:57:38 +02:00
Ralf Jung
8fb03fba15 Preparing for merge from rustc 2023-10-19 17:57:28 +02:00
Camille GILLOT
328192bff4 FileCheck transmute. 2023-10-19 15:51:54 +00:00
Camille GILLOT
69d9369f0c FileCheck inline_shims. 2023-10-19 15:51:54 +00:00
Camille GILLOT
13683554ed FileCheck issue_106141. 2023-10-19 15:51:54 +00:00
Camille GILLOT
c679b208d2 Mention skip in README. 2023-10-19 15:51:54 +00:00
Camille GILLOT
d24e44a07e FileCheck lower_slice_len. 2023-10-19 15:51:54 +00:00
Camille GILLOT
ad057d4397 FileCheck lower_array_len. 2023-10-19 15:51:54 +00:00
Camille GILLOT
4bae847969 FileCheck lower_intrinsics. 2023-10-19 15:51:54 +00:00
Camille GILLOT
d8cffda66a FileCheck casts. 2023-10-19 15:51:54 +00:00
Camille GILLOT
68c409f8f6 FileCheck combine_transmutes. 2023-10-19 15:51:54 +00:00
Camille GILLOT
386fff34f7 FileCheck duplicate_switch_targets. 2023-10-19 15:51:54 +00:00
Camille GILLOT
f856247cc9 FileCheck intrinsic_asserts. 2023-10-19 15:51:54 +00:00
Camille GILLOT
ddc328c2f1 FileCheck combine_clone_of_primitives. 2023-10-19 15:51:54 +00:00
Camille GILLOT
5453a4f056 FileCheck bool_compare. 2023-10-19 15:51:53 +00:00
Camille GILLOT
f0690d5232 FileCheck combine_array_len. 2023-10-19 15:51:53 +00:00
Camille GILLOT
d6f4bd5a8d Add README. 2023-10-19 15:51:53 +00:00
Camille GILLOT
38bf660771 FileCheck box_expr.rs
This check is made `needs-unwind`, as the panic=abort case is a strictly
simpler version.
2023-10-19 15:51:53 +00:00
Camille GILLOT
f65eb1f752 FileCheck basic_assignment.rs. 2023-10-19 15:51:53 +00:00
Camille GILLOT
00a7958e79 FileCheck asm_unwind_panic_abort.rs 2023-10-19 15:51:53 +00:00
Camille GILLOT
47fa01d2b8 FileCheck array_index_is_temporary.rs 2023-10-19 15:51:53 +00:00
Camille GILLOT
8daf14f046 Run filecheck on reference_prop.rs 2023-10-19 15:51:53 +00:00
Camille GILLOT
4ff03cd1a4 Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
bors
c104861b7b Auto merge of #116940 - matthiaskrgr:rollup-25ezp8a, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #116650 (add some comments and some cleanup around Miri intptrcast)
 - #116896 (Only check in a single place if a pass is enabled.)
 - #116906 (Use v0.0.0 in compiler crates)
 - #116921 (fix(bootstrap) info message show correct path now)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-10-19 13:25:39 +00:00
Matthias Krüger
e8544f80ec
Rollup merge of #116921 - Fenex:fix/bootstrap-setup-info-msg, r=compiler-errors
fix(bootstrap) info message show correct path now

running `./x setup tools` showed me a note with incorrect path
2023-10-19 14:38:28 +02:00
Matthias Krüger
c9764263d2
Rollup merge of #116906 - compiler-errors:version-0, r=oli-obk
Use v0.0.0 in compiler crates

I may be totally off base here, but my understanding is that it's conventional to use v0.0.0 to reflect the unversioned nature of the compiler crates. Fix that for some of the compiler crates that were created recently.
2023-10-19 14:38:27 +02:00
Matthias Krüger
096943a534
Rollup merge of #116896 - cjgillot:single-inline, r=oli-obk
Only check in a single place if a pass is enabled.

Fixes https://github.com/rust-lang/rust/issues/116294
2023-10-19 14:38:26 +02:00
Matthias Krüger
1d46614335
Rollup merge of #116650 - RalfJung:miri-intptrcast, r=oli-obk
add some comments and some cleanup around Miri intptrcast

`@saethlin` maybe this helps a bit?
2023-10-19 14:38:26 +02:00
bors
cd477d4b0c Auto merge of #11621 - GuillaumeGomez:needless_pass_by_ref_mut-closure-non-async-fn, r=blyxyas
Needless pass by ref mut closure non async fn

Fixes https://github.com/rust-lang/rust-clippy/issues/11620.
Fixes https://github.com/rust-lang/rust-clippy/issues/11561.

changelog: [`needless_pass_by_ref_mut`]: Correctly handle arguments moved into closure in non-async functions.

r? `@Centri3`
2023-10-19 12:04:07 +00:00
bors
9574d28cb6 Auto merge of #11683 - Alexendoo:msrv-config, r=Manishearth,flip1995
Deserialize `Msrv` directly in `Conf`

Gives the error a span pointing to the invalid config value

Also puts `Conf` itself in the `OnceLock` rather than just the `Msrv` for [the `register_late_mod_pass` work](https://github.com/rust-lang/rust/pull/116731) since it will be used from two different callbacks

changelog: none
2023-10-19 11:51:08 +00:00
bors
3fbcfd2b6f Auto merge of #116132 - darthunix:connect_poll, r=cuviper
Make TCP connect handle EINTR correctly

According to the [POSIX](https://pubs.opengroup.org/onlinepubs/009695399/functions/connect.html) standard, if connect() is interrupted by a signal that is caught while blocked waiting to establish a connection, connect() shall fail and set errno to EINTR, but the connection request shall not be aborted, and the connection shall be established asynchronously. When the connection has been established asynchronously, select() and poll() shall indicate that the file descriptor for the socket is ready for writing.

The previous implementation differs from the recomendation: in a case of the EINTR we tried to reconnect in a loop and sometimes get EISCONN error (this problem was originally detected on MacOS).

1. More details about the problem in an [article](http://www.madore.org/~david/computers/connect-intr.html).
2. The original [issue](https://git.picodata.io/picodata/picodata/tarantool-module/-/issues/157).
2023-10-19 11:22:28 +00:00
bors
a01382dbea Auto merge of #116037 - wesleywiser:stack_protector_test_windows, r=cuviper
Add `-Zstack-protector` test for Windows targets

Add variants of the `stack-protector-heuristics-effect.rs` test for 32-bit and 64-bit MSVC Windows and update the original test to run on GNU Windows targets.

I added two tests instead of trying to modify the original because:
  - MSVC uses a different function name (`__security_check_cookie` to perform the test rather than doing the test inline and calling `__stack_chk_fail`).
  - LLVM's stack protection pass doesn't currently support generating checks for [frames with funclet based EH personality](37fd3c96b9/llvm/lib/CodeGen/StackProtector.cpp (L103C1-L109C4)).
  - 32-bit Windows uses classic EH while 64-bit Windows uses table-based EH which results in slightly different codegen.

[CI run with test passing on {i686,x86_64}-{msvc,mingw}](https://github.com/rust-lang/rust/actions/runs/6275450644/job/17042958375?pr=116037)
2023-10-19 07:50:09 +00:00
onur-ozkan
0c55576a06 trigger the triagebot for modifications to bootstrap/defaults
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-19 08:39:55 +03:00
onur-ozkan
8a45eed31c fix bootstrap paths in triagebot.toml
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-19 08:39:28 +03:00
bors
e120dea3b3 Auto merge of #3129 - rust-lang:dependabot/cargo/miri-script/rustix-0.38.19, r=RalfJung
Bump rustix from 0.38.17 to 0.38.19 in /miri-script

Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.38.17 to 0.38.19.
<details>
<summary>Commits</summary>
<ul>
<li><a href="3a53dfe16c"><code>3a53dfe</code></a> chore: Release rustix version 0.38.19</li>
<li><a href="55cbe8839c"><code>55cbe88</code></a> Fixes for <code>Dir</code> on macOS, FreeBSD, and WASI.</li>
<li><a href="31fd98ca72"><code>31fd98c</code></a> Merge pull request from GHSA-c827-hfw6-qwvm</li>
<li><a href="4bb2f4bbcd"><code>4bb2f4b</code></a> Add <code>mlockall</code> and <code>munlockall</code> (<a href="https://redirect.github.com/bytecodealliance/rustix/issues/872">#872</a>)</li>
<li><a href="d012bcf896"><code>d012bcf</code></a> Fixes needed by io_uring. (<a href="https://redirect.github.com/bytecodealliance/rustix/issues/873">#873</a>)</li>
<li><a href="5e5c0460cc"><code>5e5c046</code></a> Add a test for <code>get_socket_nosigpipe</code>. (<a href="https://redirect.github.com/bytecodealliance/rustix/issues/874">#874</a>)</li>
<li><a href="1a9d12963d"><code>1a9d129</code></a> chore: Release rustix version 0.38.18</li>
<li><a href="112c268cd7"><code>112c268</code></a> io-uring API updates. (<a href="https://redirect.github.com/bytecodealliance/rustix/issues/871">#871</a>)</li>
<li><a href="0c227041a7"><code>0c22704</code></a> Provide {get,set}_socket_nosigpipe on NetBSD and DragonFly BSD (<a href="https://redirect.github.com/bytecodealliance/rustix/issues/870">#870</a>)</li>
<li>See full diff in <a href="https://github.com/bytecodealliance/rustix/compare/v0.38.17...v0.38.19">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rustix&package-manager=cargo&previous-version=0.38.17&new-version=0.38.19)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/rust-lang/miri/network/alerts).

</details>
2023-10-19 05:12:50 +00:00
bors
36b61e5aa5 Auto merge of #116923 - fmease:rollup-ev7q387, r=fmease
Rollup of 7 pull requests

Successful merges:

 - #116663 (Don't ICE when encountering unresolved regions in `fully_resolve`)
 - #116761 (Fix podman detection in CI scripts)
 - #116795 (Add `#[track_caller]` to `Option::unwrap_or_else`)
 - #116829 (Make `#[repr(Rust)]` incompatible with other (non-modifier) representation hints like `C` and `simd`)
 - #116883 (Change my name in mailmap)
 - #116908 (Tweak wording of type errors involving type params)
 - #116912 (Some renaming nits for `rustc_type_ir`)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-10-19 03:52:32 +00:00
León Orell Valerian Liehr
8aa1d7124a
Rollup merge of #116912 - compiler-errors:rustc_type_ir-bikeshedding, r=jackh726
Some renaming nits for `rustc_type_ir`

tl;dr:
* `ListTy` -> `Tys`
* `PlaceholderType` -> `PlaceholderTy`
* `RegionVid` -> `InferRegion`
* `ListBinderExistentialPredicate` -> `BoundExistentialPredicates`
* `GenericArgsRef` -> `GenericArgs`

r? jackh726
2023-10-19 04:34:48 +02:00
León Orell Valerian Liehr
64ed233fc1
Rollup merge of #116908 - estebank:issue-78206, r=compiler-errors
Tweak wording of type errors involving type params

Fix #78206.
2023-10-19 04:34:47 +02:00
León Orell Valerian Liehr
42c7d216b7
Rollup merge of #116883 - blyxyas:fix-mailmap, r=Nilstrieb
Change my name in mailmap

I changed some things about my distro (my GPG key, along with the git username). This PR sets my committer name as `blyxyas` for those commits so that it is the same as my reviewer name in `thanks`.
2023-10-19 04:34:47 +02:00
León Orell Valerian Liehr
2eb6e5f740
Rollup merge of #116829 - fmease:rust-aint-c, r=compiler-errors
Make `#[repr(Rust)]` incompatible with other (non-modifier) representation hints like `C` and `simd`

Read more about this change here: https://github.com/rust-lang/rust/pull/116829#issuecomment-1768618240.

Fixes [after backport] #116825.
2023-10-19 04:34:46 +02:00
León Orell Valerian Liehr
80c9588549
Rollup merge of #116795 - DaniPopes:track-caller-option, r=cuviper
Add `#[track_caller]` to `Option::unwrap_or_else`

Same as #116317 but for `Option`.

Closes #115302
2023-10-19 04:34:46 +02:00
León Orell Valerian Liehr
29d98777cb
Rollup merge of #116761 - Nilstrieb:podman, r=cuviper
Fix podman detection in CI scripts

When docker-podman compat was set up in a way that causes "docker" to be the argv[0] of podman, the previous detection did not work. This was for example the case in the compat package from nixpkgs.

This checks the output and should work everywhere.

I tested it locally by executing
```sh
if [[ "$id" != 0 && "$(docker version)" =~ Podman ]]; then
    echo yes
else
    echo no
fi
```
which printed `no` before, and `yes` now.

fixes #113129

r? cuviper
2023-10-19 04:34:45 +02:00
León Orell Valerian Liehr
2dd1c8f693
Rollup merge of #116663 - compiler-errors:resolve-regions, r=lcnr
Don't ICE when encountering unresolved regions in `fully_resolve`

We can encounter unresolved regions due to unconstrained impl lifetime arguments because `collect_return_position_impl_trait_in_trait_tys` runs before WF actually checks that the impl is well-formed.

Fixes #116525
2023-10-19 04:34:45 +02:00