[beta] Clippy backport
r? `@Mark-Simulacrum`
Backports:
- rust-lang/rust-clippy#12486
- rust-lang/rust-clippy#12572
- rust-lang/rust-clippy#12508
- rust-lang/rust-clippy#12617
The first one is a bit bigger as usual for a backport. But it fixes a major issue with this lint that we overlooked. So I think this is worth it. After that was merged into nightly, there were no new issues opened about this lint, so IMO this is safe to backport to `beta` and put into stable.
avoid an ICE in `ptr_as_ptr` when getting the def_id of a local
Fixes#12616
`Res::def_id` can panic, so avoid calling it in favor of `opt_def_id`, so we can gracefully handle resolutions that don't have a `DefId` (e.g. local variables) and get a false negative in the worst case, rather than an ICE
changelog: Fix ICE in [`ptr_as_ptr`] when the cast expression is a function call to a local variable
Fix infinite loop in `cast_sign_loss` when peeling unwrap method calls
Fixes#12506
The lint wants to peel method calls but didn't actually reassign the expression, leading to an infinite loop.
----
changelog: Fix infinite loop in [`cast_sign_loss`] when having two chained `.unwrap()` calls
don't lint [`mixed_attributes_style`] when mixing docs and other attrs
fixes: #12435fixes: #12436fixes: #12530
---
changelog: don't lint [`mixed_attributes_style`] when mixing different kind of attrs; and move it to late pass;
it seems gdb 15 regresses some of our debuginfo tests. disable them
temporarily so that CI doesn't randomly start failing soon.
(cherry picked from commit 6e19f82160c216fcb5f8eaff915b7fe274a5568e)
[beta] backports
- fix attribute validation on associated items in traits #121545
- Only inspect user-written predicates for privacy concerns #123377
- Check def id before calling `match_projection_projections` #123471
- Restore `pred_known_to_hold_modulo_regions` #123578
- Beta revert "Use OS thread name by default" #123533
r? cuviper
This reverts #121666 due to #123495
This has already been done on master but beta needs something that will backport cleanly.
(cherry picked from commit 081ad8527d7b79e4761c497c12930e630de9a230)
[beta] backports
- Fix f16 and f128 feature gates in editions other than 2015 #123307 / #123445
- Update to LLVM 18.1.2 #122772
- unix fs: Make hurd using explicit new rather than From #123057
- Don't inherit codegen attrs from parent static #123310
- Make sure to insert Sized bound first into clauses list #123302
r? cuviper
408c0ea2162b ("unix time module now return result") dropped the From
impl for SystemTime, breaking the hurd and horizon builds.
Fixes#123032
(cherry picked from commit 7b4e5079619f99a1bff8a2f388b498be5687d280)
Reproduce the bug from <https://github.com/rust-lang/rust/issues/123282>
that indicates this feature gate hits edition-dependent resolution paths.
Resolution changed in edition 2018, so test that as well.
(cherry picked from commit 9a7b1762279eaa95d0289760d3b859fbbc9221f1)
[beta] backports
- Do not eat nested expressions' results in `MayContainYieldPoint` format args visitor #122680
- Fix heading anchors in doc pages. #122693
- Make `#[diagnostic::on_unimplemented]` format string parsing more robust #122402
- Update ninja on Windows #123178
r? cuviper
Errors started showing up, and I read somewhere that this might be
because of old ninja versions. This ninja version is indeed *ancient*.
```
multiple outputs aren't (yet?) supported by depslog; bring this up on the mailing list if it affects you
```
(cherry picked from commit b546764cbef7ac449cbad86636b4ca8daa9f5ef6)
This commit fixes several issues with the format string parsing of the
`#[diagnostic::on_unimplemented]` attribute that were pointed out by
@ehuss.
In detail it fixes:
* Appearing format specifiers (display, etc). For these we generate a
warning that the specifier is unsupported. Otherwise we ignore them
* Positional arguments. For these we generate a warning that positional
arguments are unsupported in that location and replace them with the
format string equivalent (so `{}` or `{n}` where n is the index of the
positional argument)
* Broken format strings with enclosed }. For these we generate a warning
about the broken format string and set the emitted message literally to
the provided unformatted string
* Unknown format specifiers. For these we generate an additional warning
about the unknown specifier. Otherwise we emit the literal string as
message.
This essentially makes those strings behave like `format!` with the
minor difference that we do not generate hard errors but only warnings.
After that we continue trying to do something unsuprising (mostly either
ignoring the broken parts or falling back to just giving back the
literal string as provided).
Fix#122391
(cherry picked from commit 5568c569c03c8c22ce81185b9e49efcaa6866050)
[beta-1.78] Update cargo
2 commits in 2fe739fcf16c5bf8c2064ab9d357f4a0e6c8539b..54d8815d04fa3816edc207bbc4dd36bf18014dbc
2024-03-15 21:39:18 +0000 to 2024-03-26 18:23:22 +0000
- [beta-1.78] Do not strip debuginfo by default for MSVC (rust-lang/cargo#13653)
- [beta 1.78] Fix publish script due to crates.io CDN change (rust-lang/cargo#13616)
r? ghost