| Age | Commit message (Collapse) | Author | Lines |
|
Disable MIR SROA optimization by default
Turn off the MIR SROA optimization by default to prevent incorrect debuginfo generation and rustc ICEs caused by invalid LLVM IR being created.
Related to #115113
r? `@cuviper`
cc `@saethlin`
|
|
Turn off the MIR SROA optimization by default to prevent incorrect
debuginfo generation and rustc ICEs caused by invalid LLVM IR being
created.
Related to #115113
|
|
[stable] backport lint-docs fix
r? `@Mark-Simulacrum`
|
|
|
|
This was not the correct fix. The problem was two-fold:
- `download-rustc` didn't respect `llvm.assertions`
- `rust-dev` was missing a bump to `download-ci-llvm-stamp`
The first is fixed in this PR and the latter was fixed a while ago. Revert this change to avoid breaking `rpath = false`.
|
|
[stable] 1.72.0 release
r? `@Mark-Simulacrum`
|
|
|
|
[beta] backports
* Upgrade std to gimli 0.28.0 #114825
* Partially revert #107200 #114897
* Permit pre-evaluated constants in simd_shuffle #113529
r? cuviper
|
|
(cherry picked from commit c7428d50520446ccd44ca89bbbf4ff7a4725570e)
|
|
(cherry picked from commit 9e5a67e57f715ec5eda915db1261cdf4c4a04642)
|
|
`Ok(0)` is indeed something the caller may interpret as an error, but
that's the *correct* thing to return if the writer can't accept any more
bytes.
(cherry picked from commit 5210f482d7309004c0ff3f6306f052f8d5adb67b)
|
|
|
|
[beta] Clippy backports for ICE fixes
This backports PRs to beta, that fix ICEs, some lint grouping and FP fixes. Namely:
- https://github.com/rust-lang/rust-clippy/pull/11191
- https://github.com/rust-lang/rust-clippy/pull/11172
- https://github.com/rust-lang/rust-clippy/pull/11130
- https://github.com/rust-lang/rust-clippy/pull/11106
- https://github.com/rust-lang/rust-clippy/pull/11104
- https://github.com/rust-lang/rust-clippy/pull/11077
- https://github.com/rust-lang/rust-clippy/pull/11070 (This PR is not synced to the Rust repo yet, but I will open a separate PR to get it into `master`, before beta is branched: https://github.com/rust-lang/rust/pull/114938)
- https://github.com/rust-lang/rust-clippy/pull/11069
Kind of a big backport, but most of it is tests.
r? `@Mark-Simulacrum`
cc `@Manishearth`
|
|
[`missing_fields_in_debug`]: make sure self type is an adt
Fixes #11063, another ICE that can only happen in core.
This lint needs the `DefId` of the implementor to get its fields, but that ICEs if the implementor does not have a `DefId` (as is the case with primitive types, e.g. `impl Debug for bool`), which is where this ICE comes from.
This PR changes the check I added in #10897 to be more... robust against `Debug` implementations we don't want to lint.
Instead of just checking if the self type is a type parameter and "special casing" one specific case we don't want to lint, we should probably rather just check that the self type is either a struct, an enum or a union and only then continue.
That prevents weird edge cases like this one that can only happen in core.
Again, I don't know if it's even possible to add a test case for this since one cannot implement `Debug` for primitive types outside of the crate that defined `Debug` (core).
I did make sure that this PR no longer ICEs on `impl<T> Debug for T` and `impl Debug for bool`.
Maybe writing such a test is possible with `#![no_core]` and then re-defining the `Debug` trait or something like that...?
changelog: [`missing_fields_in_debug`]: make sure self type is an adt (fixes an ICE in core)
r? `@Alexendoo` (reviewed the last PRs for this lint)
|
|
[`useless_conversion`]: only lint on paths to fn items and fix FP in macro
Fixes #11065 (which is actually two issues: an ICE and a false positive)
It now makes sure that the function call path points to a function-like item (and not e.g. a `const` like in the linked issue), so that calling `TyCtxt::fn_sig` later in the lint does not ICE (fixes https://github.com/rust-lang/rust-clippy/issues/11065#issuecomment-1616836099).
It *also* makes sure that the expression is not part of a macro call (fixes https://github.com/rust-lang/rust-clippy/issues/11065#issuecomment-1616919639). ~~I'm not sure if there's a better way to check this other than to walk the parent expr chain and see if any of them are expansions.~~ (edit: it doesn't do this anymore)
changelog: [`useless_conversion`]: fix ICE when call receiver is a non-fn item
changelog: [`useless_conversion`]: don't lint if argument is a macro argument (fixes a FP)
r? `@llogiq` (reviewed #10814, which introduced these issues)
|
|
[`unnecessary_literal_unwrap`]: Fix ICE on None.unwrap_or_default()
Fixes #11099
Fixes #11064
I'm running into #11099 (cc `@y21)` on my Rust codebase. Clippy ICEs on this code when evaluating the `unnecessary_literal_unwrap` lint:
```rust
fn main() {
let val1: u8 = None.unwrap_or_default();
}
```
This fixes that ICE and adds an message specifically for that case:
```
error: used `unwrap_or_default()` on `None` value
--> $DIR/unnecessary_literal_unwrap.rs:26:5
|
LL | None::<String>.unwrap_or_default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the `None` and `unwrap_or_default()`: `String::default()`
```
This PR also fixes the same ICE with `None.unwrap_or_else` (by giving the generic error message for the lint in that case).
changelog: Fix ICE in `unnecessary_literal_unwrap` on `None.unwrap_or_default()`
|
|
Fix ICE in #10535
Fixes #10535
r? `@Jarcho`
changelog: Eliminate ICE described in #10535
|
|
redundant_type_annotations: only pass certain def kinds to type_of
Fixes #11190
Fixes rust-lang/rust#113516
Also adds an `is_lint_allowed` check to skip the lint when it's not needed
changelog: none
|
|
`arc_with_non_send_sync`: reword and move to `suspicious`
Fixes #11079
changelog: [`arc_with_non_send_sync`]: move to complexity
|
|
[`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`
|
|
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`
|
|
[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
|
|
|
|
[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.
|
|
|
|
We show this miscompilation in this commit.
|
|
[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
|
|
(cherry picked from commit fb5efd7008c698a821e9c50c3f3a04d48abd8295)
|
|
the host.
thus we should no longer see test failures for e.g. wasm32 target.
(cherry picked from commit a2a7f27fd2548874b203f1f577f64cf61627e0a5)
|
|
unconditional logic otherwise.
(cherry picked from commit a2058ddbed82adda55ce39f0e0915996706cb2b9)
|
|
fix to test as proposed by wesleywiser
Co-authored-by: Wesley Wiser <wwiser@gmail.com>
(cherry picked from commit 5881e5f88d9245ef9259ca600b32af80d5972a7f)
|
|
(cherry picked from commit 7a0e2ee133dacf4e2dbda64a316a95746a469c58)
|
|
rustc_codegen_ssa::back::linker::exported_symbols to only export the two symbols that proc-macros need.
(cherry picked from commit 3000c24afc37fe09c65772a71331002a7505dc11)
|
|
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)
|
|
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)
|
|
(cherry picked from commit fb31a1ac21833b205196128b7425f5c587cd883c)
|
|
(cherry picked from commit 45ffe41d144e3e5bc8993abcbcdd54d870a2ff53)
|
|
This reverts commit 08ce68b6a6bad360e9c3611ad60cf6598401f878.
(cherry picked from commit 05bc71cfaf9eb35caab425126d4fa8dcb8c62072)
|
|
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)
|
|
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)
|
|
`()` 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)
|
|
(cherry picked from commit f25ad54a4d0febbcb2b7e951835228b7b2320b49)
|
|
(cherry picked from commit fa15df6f5a85ceb5919a47bb721a337c7b8f0adc)
|
|
(cherry picked from commit 3dbbf23e29516218863bda29d2983bd503e6b7fd)
|
|
[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`
|
|
|
|
[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`
|
|
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`
|
|
|
|
[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`
|