229020 Commits

Author SHA1 Message Date
bors
1888037438
Auto merge of #11077 - y21:issue11076, r=Manishearth
[`arc_with_non_send_sync`]: don't lint if type has nested type parameters

Fixes #11076

changelog: [`arc_with_non_send_sync`]: don't lint if type has nested type parameters

r? `@Manishearth`
2023-08-17 16:52:14 +02:00
bors
214ab1197f
Auto merge of #11172 - Alexendoo:tuple-array-conversions-nursery, r=xFrednet
Move tuple_array_conversions to nursery

changelog: Move [`tuple_array_conversions`] to `nursery` (Now allow-by-default)
<!-- FIY: Ignore this change, if the commit gets backported and also https://github.com/rust-lang/rust-clippy/pull/11146 -->
[#11172](https://github.com/rust-lang/rust-clippy/pull/11172)

The nursery change got lost in #11146 and it ended up in pedantic, this puts it in nursery and gives something to backport

r? `@xFrednet`
2023-08-17 16:47:30 +02:00
bors
ab197f48b4 Auto merge of #114906 - weihanglo:update-beta-cargo, r=weihanglo
[beta-1.72.0] backport cargo

1 commits in 44b6be4bdf2cd7d3f4d4cb266bfe428dfc2a7952..103a7ff2ee7678d34f34d778614c5eb2525ae9de
2023-08-03 13:43:58 +0000 to 2023-08-15 23:32:44 +0000
- [beta-1.72.0] bump cargo-util to 0.2.5 (rust-lang/cargo#12505)

r? ghost
2023-08-17 02:55:10 +00:00
Weihang Lo
7acad66119
[beta] Update cargo 2023-08-16 19:19:40 +01:00
bors
598a0a3cb3 Auto merge of #114726 - DianQK:beta, r=cuviper
[beta] Update LLVM to resolve a miscompilation found in 114312.

Related issue: #114312 .

After the master updates the LLVM, we will add the same test cases. In the meantime, close the issue.
2023-08-12 05:38:25 +00:00
DianQK
e241551f8b
[beta-1.72] Update LLVM to resolve a miscompilation found in 114312. 2023-08-12 12:19:45 +08:00
DianQK
81e1247e8b
[beta-1.72] Pre-commit test for issue 114312.
We show this miscompilation in this commit.
2023-08-12 12:19:20 +08:00
bors
d1fa3e4de3 Auto merge of #114748 - cuviper:beta-next, r=cuviper
[beta] backport

* Restrict linker version script of proc-macro crates to just its two symbols #114470
* bootstrap: config: fix version comparison bug #114440
* lint/ctypes: only try normalize #113921
* Avoid tls access while iterating through mpsc thread entries #113861
* Substitute types before checking inlining compatibility. #113802
* Revert "fix: bug etc/bash_complettion -> src/etc/... to avoid copy error" #113579
* lint/ctypes: fix () return type checks #113457
* Rename and allow cast_ref_to_mut lint #113422
* Ignore flaky clippy tests. #113621

r? cuviper
2023-08-12 03:05:01 +00:00
Eric Huss
4d0501412a Ignore flaky clippy tests.
(cherry picked from commit fb5efd7008c698a821e9c50c3f3a04d48abd8295)
2023-08-11 19:17:23 -07:00
Felix S. Klock II
bc3491f99e fix proc-macro test added here to solely be exercised as a build product for the host.
thus we should no longer see test failures for e.g. wasm32 target.

(cherry picked from commit a2a7f27fd2548874b203f1f577f64cf61627e0a5)
2023-08-11 18:52:37 -07:00
Felix S. Klock II
a94c607997 Review feedback: return empty iff !should_codegen, and use simpler unconditional logic otherwise.
(cherry picked from commit a2058ddbed82adda55ce39f0e0915996706cb2b9)
2023-08-11 18:52:37 -07:00
Felix S Klock II
fecb6b277c Update tests/ui/proc-macro/no-mangle-in-proc-macro-issue-111888.rs
fix to test as proposed by wesleywiser

Co-authored-by: Wesley Wiser <wwiser@gmail.com>
(cherry picked from commit 5881e5f88d9245ef9259ca600b32af80d5972a7f)
2023-08-11 18:52:37 -07:00
Felix S. Klock II
6afdab5c68 regression test for issue 111888.
(cherry picked from commit 7a0e2ee133dacf4e2dbda64a316a95746a469c58)
2023-08-11 18:52:37 -07:00
Felix S. Klock II
8f4613ea77 special-case proc-macro crates in rustc_codegen_ssa:🔙:linker::exported_symbols to only export the two symbols that proc-macros need.
(cherry picked from commit 3000c24afc37fe09c65772a71331002a7505dc11)
2023-08-11 18:52:37 -07:00
Ariadne Conill
a3d2871102 bootstrap: config: fix version comparison bug
Rust requires a previous version of Rust to build, such as the current version, or the
previous version.  However, the version comparison logic did not take patch releases
into consideration when doing the version comparison for the current branch, e.g.
Rust 1.71.1 could not be built by Rust 1.71.0 because it is neither an exact version
match, or the previous version.

Adjust the version comparison logic to tolerate mismatches in the patch version.

Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
(cherry picked from commit 31a81a08786826cc6e832bd0b49fb8b934e29648)
2023-08-11 18:52:16 -07:00
David Wood
0426c1f1d5 lint/ctypes: only try normalize
Now that this lint runs on any external-ABI fn-ptr, normalization won't
always succeed, so use `try_normalize_erasing_regions` instead.

Signed-off-by: David Wood <david@davidtw.co>
(cherry picked from commit 09434a2575cee12b241c516ad91f21d4b4f9c3fd)
2023-08-11 18:51:55 -07:00
Ibraheem Ahmed
fc3ed7c298 avoid tls access while iterating through mpsc thread entries
(cherry picked from commit fb31a1ac21833b205196128b7425f5c587cd883c)
2023-08-11 18:49:41 -07:00
Camille GILLOT
33322e06da Substitute types before checking compatibility.
(cherry picked from commit 45ffe41d144e3e5bc8993abcbcdd54d870a2ff53)
2023-08-11 18:48:56 -07:00
ekusiadadus
64b4a54227 Revert "fix: 🐛 etc/bash_complettion -> src/etc/... to avoid copy error"
This reverts commit 08ce68b6a6bad360e9c3611ad60cf6598401f878.

(cherry picked from commit 05bc71cfaf9eb35caab425126d4fa8dcb8c62072)
2023-08-11 18:48:09 -07:00
David Wood
91e377c286 lint/ctypes: allow () within types
Consider `()` within types to be FFI-safe, and `()` to be FFI-safe as a
return type (incl. when in a transparent newtype).

Signed-off-by: David Wood <david@davidtw.co>
(cherry picked from commit 24f90fdd2654e9c5437a684d3a72a4e70826a985)
2023-08-11 18:47:47 -07:00
David Wood
e9cd650331 lint: refactor check_variant_for_ffi
Simplify this function a bit, it was quite hard to reason about.

Signed-off-by: David Wood <david@davidtw.co>
(cherry picked from commit 99b1897cf640d5f6dac74416761c9b3c75e1ef7a)
2023-08-11 18:46:58 -07:00
David Wood
7744a86963 lint/ctypes: stricter () return type checks
`()` is normally FFI-unsafe, but is FFI-safe when used as a return type.
It is also desirable that a transparent newtype for `()` is FFI-safe when
used as a return type.

In order to support this, when an type was deemed FFI-unsafe, because of
a `()` type, and was used in return type - then the type was considered
FFI-safe. However, this was the wrong approach - it didn't check that the
`()` was part of a transparent newtype! The consequence of this is that
the presence of a `()` type in a more complex return type would make it
the entire type be considered safe (as long as the `()` type was the
first that the lint found) - which is obviously incorrect.

Instead, this logic is removed, and a unit return type or a transparent
wrapper around a unit is checked for directly for functions and fn-ptrs.

Signed-off-by: David Wood <david@davidtw.co>
(cherry picked from commit f53cef31f5ea41c9a5ab8e5335637a6873b9f0b5)
2023-08-11 18:41:21 -07:00
Urgau
e20288d2af Temporarily switch invalid_reference_casting lint to allow-by-default
(cherry picked from commit f25ad54a4d0febbcb2b7e951835228b7b2320b49)
2023-08-11 18:40:46 -07:00
Urgau
b3458da65b Rename cast_ref_to_mut to invalid_reference_casting (clippy side)
(cherry picked from commit fa15df6f5a85ceb5919a47bb721a337c7b8f0adc)
2023-08-11 18:40:43 -07:00
Urgau
f39eb7e658 Rename cast_ref_to_mut lint to invalid_reference_casting
(cherry picked from commit 3dbbf23e29516218863bda29d2983bd503e6b7fd)
2023-08-11 18:37:37 -07:00
bors
d8fd588afa Auto merge of #114422 - weihanglo:update-beta-cargo, r=weihanglo
[beta-1.72] Update cargo (CVE-2023-38497 fix included)

1 commits in 11ffe0e500346b26e3de1ba115482b4da586dfac..44b6be4bdf2cd7d3f4d4cb266bfe428dfc2a7952
2023-07-30 20:44:11 +0000 to 2023-08-03 13:43:58 +0000
- Fix CVE-2023-38497 for beta 1.72.0 (rust-lang/cargo#12442)

r? `@ghost`
2023-08-03 18:39:49 +00:00
Weihang Lo
bbdc4d065f
[beta-1.72] Update cargo 2023-08-03 15:45:13 +01:00
bors
1537df02f8 Auto merge of #114279 - weihanglo:update-beta-cargo, r=weihanglo
[beta-1.72] Update cargo

1 commits in dd6536b8ed28f73c0e82089c72ef39a03bc634be..11ffe0e500346b26e3de1ba115482b4da586dfac
2023-07-18 14:02:13 +0000 to 2023-07-30 20:44:11 +0000
- [beta-1.72] backport rust-lang/cargo#12411 (rust-lang/cargo#12417)

r? `@ghost`
2023-08-01 11:28:57 +00:00
bors
efb1be3a08 Auto merge of #113786 - Kobzol:ci-disable-dist-tests, r=Mark-Simulacrum
Disable dist tests on beta/stable

Should resolve the beta/stable part of https://github.com/rust-lang/rust/issues/113784. To be extra safe, I also made the read of `RUST_RELEASE_CHANNEL` optional, just in case it was missing.

r? `@Mark-Simulacrum`
2023-08-01 07:18:59 +00:00
Weihang Lo
391c7fb42a
[beta] Update cargo 2023-07-31 09:58:35 +01:00
bors
a47f796a36 Auto merge of #113938 - Mark-Simulacrum:beta-backport, r=Mark-Simulacrum
[beta] backport

This PR backports:

- #113690: allow opaques to be defined by trait queries, again
- #113631: make MCP510 behavior opt-in to avoid conflicts between the CLI and target flavors

It also includes a bump of bootstrap to the released stable.

r? `@Mark-Simulacrum`
2023-07-22 02:58:19 +00:00
Rémy Rakic
179768c36a make MCP510 behavior explicitly opt-in
because sometimes users can't opt out
2023-07-21 20:37:21 -04:00
Ali MJ Al-Nasrawy
5a473bb693 allow opaques to be defined by trait queries 2023-07-21 20:37:06 -04:00
Mark Rousskov
dafcc0eb3f Bump to released stable compiler 2023-07-21 20:36:14 -04:00
bors
aad221e296 Auto merge of #113836 - weihanglo:update-beta-cargo, r=weihanglo
[beta-1.72] Update cargo

2 commits in 45782b6b8afd1da042d45c2daeec9c0744f72cc7..dd6536b8ed28f73c0e82089c72ef39a03bc634be
2023-07-05 16:54:51 +0000 to 2023-07-18 14:02:13 +0000
- [beta-1.72] backport rust-lang/cargo#12359 (rust-lang/cargo#12371)
- [beta-1.72] Bump version of crates-io due to unintentional semver-breaking change (rust-lang/cargo#12356)

r? ghost
2023-07-19 09:40:03 +00:00
Weihang Lo
d150dd6a1c
[beta] Update cargo 2023-07-18 17:42:58 +01:00
Jakub Beránek
26a314b9cd
Disable dist tests on beta/stable 2023-07-17 14:08:33 +02:00
bors
7ba605cd90 Auto merge of #113540 - Mark-Simulacrum:beta-backport, r=Mark-Simulacrum
[beta] promote 1.72

r? `@Mark-Simulacrum`
2023-07-11 04:32:22 +00:00
Mark Rousskov
27ff819198 Use channel name in artifact -- fixes beta builds
This likely will break on stable promotion because stable artifacts are named with stable version
rather than channel name; we'll want to figure out the right fix for that in a follow-up.
2023-07-10 23:15:50 -04:00
Mark Rousskov
c5aa8fb8c5 Bump channel to beta 2023-07-10 10:41:30 -04:00
Mark Rousskov
5aab48f3d2 Replace version placeholder to 1.72 2023-07-10 10:41:13 -04:00
bors
83964c156d Auto merge of #113491 - matthiaskrgr:rollup-mueqz7h, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #113005 (Don't call `query_normalize` when reporting similar impls)
 - #113064 (std: edit [T]::swap docs)
 - #113138 (Add release notes for 1.71.0)
 - #113217 (resolve typerelative ctors to adt)
 - #113254 (Use consistent formatting in Readme)
 - #113482 (Migrate GUI colors test to original CSS color format)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-07-08 20:56:57 +00:00
Matthias Krüger
de9b9c833b
Rollup merge of #113482 - GuillaumeGomez:migrate-gui-test-color-20, r=notriddle
Migrate GUI colors test to original CSS color format

Follow-up of https://github.com/rust-lang/rust/pull/111459.

r? ``@notriddle``
2023-07-08 20:53:30 +02:00
Matthias Krüger
dd8322876e
Rollup merge of #113254 - atouchet:rd3, r=Mark-Simulacrum
Use consistent formatting in Readme
2023-07-08 20:53:30 +02:00
Matthias Krüger
b637be7a17
Rollup merge of #113217 - ericmarkmartin:lower-type-relative-ctor-to-adt, r=cjgillot
resolve typerelative ctors to adt

Associated issue: #110508

r? ``@spastorino``
2023-07-08 20:53:29 +02:00
Matthias Krüger
14aeef369c
Rollup merge of #113138 - cuviper:relnotes-1.71.0, r=Mark-Simulacrum
Add release notes for 1.71.0

r? ``@Mark-Simulacrum``
cc ``@rust-lang/release``
2023-07-08 20:53:28 +02:00
Matthias Krüger
8c562996dd
Rollup merge of #113064 - marcospb19:add-note-in-vec-swap-docs, r=Mark-Simulacrum
std: edit [T]::swap docs

Add a note about what happens when index arguments are equal.
2023-07-08 20:53:27 +02:00
Matthias Krüger
48a0d038fa
Rollup merge of #113005 - compiler-errors:dont-query-normalize, r=cjgillot
Don't call `query_normalize` when reporting similar impls

Firstly, It's sketchy to be using `query_normalize` at all during HIR typeck -- it's asking for an ICE 😅. Secondly, we're normalizing an impl trait ref that potentially has parameter types in `ty::ParamEnv::empty()`, which is kinda sketchy as well.

The only UI test change from removing this normalization is that we don't evaluate anonymous constants in impls, which end up giving us really ugly suggestions:

```
error[E0277]: the trait bound `[X; 35]: Default` is not satisfied
 --> /home/gh-compiler-errors/test.rs:4:5
  |
4 |     <[X; 35] as Default>::default();
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `[X; 35]`
  |
  = help: the following other types implement trait `Default`:
            &[T]
            &mut [T]
            [T; 32]
            [T; core::::array::{impl#30}::{constant#0}]
            [T; core::::array::{impl#31}::{constant#0}]
            [T; core::::array::{impl#32}::{constant#0}]
            [T; core::::array::{impl#33}::{constant#0}]
            [T; core::::array::{impl#34}::{constant#0}]
          and 27 others
```

So just fold the impls with a `BottomUpFolder` that calls `ty::Const::eval`. This doesn't work totally correctly with generic-const-exprs, but it's fine for stable code, and this is error reporting after all.
2023-07-08 20:53:27 +02:00
bors
d1389b9b48 Auto merge of #113484 - matthiaskrgr:rollup-goq2u0d, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #112931 (Enable zlib in LLVM on aarch64-apple-darwin)
 - #113158 (tests: unset `RUSTC_LOG_COLOR` in a test)
 - #113173 (CI: include workflow name in concurrency group)
 - #113335 (Reveal opaques in new solver)
 - #113390 (CGU formation tweaks)
 - #113399 (Structurally normalize again for byte string lit pat checking)
 - #113412 (Add basic types to SMIR)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-07-08 18:36:58 +00:00
bors
4353b1ecd6 Auto merge of #113450 - Nilstrieb:src/bootstrap/test.rs, r=flip1995
Fail the build if clippy tests don't pass

This was removed in
de69d556eb (diff-8479eab02701e686aedb15b567dc8fc31220c6e4efb9565ccc9d662b7fee2214) which caused CI to ignore clippy failures. This adds back the exit, which should cause CI to fail again if a test is broken (like right now, as clippy tests are broken on master).

Also see https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/CI.20doesn't.20care.20about.20clippy.20test.20failures.20but.20only.20sometime

r? flip1995
2023-07-08 16:12:28 +00:00