bors
b0e925903a
Auto merge of #141024 - jieyouxu:revert-arm64ec, r=wesleywiser
...
Revert "Fix linking statics on Arm64EC #140176 "
This reverts PR #140176 .
Unfortunately, this will reopen https://github.com/rust-lang/rust/issues/138541 (re-breaking the `arm64ec-pc-windows-msvc` target).
Unfortunately, multiple people are [reporting linker warnings related to `__rust_no_alloc_shim_is_unstable`](https://github.com/rust-lang/rust/pull/140176#issuecomment-2879715554 ) after this change in `x86_64-pc-windows-msvc` as well. The solution isn't quite clear yet, let's revert to avoid the linker warnings on the Tier 1 MSVC target for now[^timing], and try a reland with a determined solution for `__rust_no_alloc_shim_is_unstable`.
Judging from [people reporting that they are observing this also when bootstrapping w/ stage0 rustc](https://github.com/rust-lang/rust/pull/140176#issuecomment-2881867433 ), we may have to cut a new beta and then repoint stage0 against that newer beta?
cc `@dpaoliello` `@wesleywiser`
r? `@wesleywiser` (or compiler)
[^timing]: Note that it's still RustWeek this week, so most team members are N/A.
2025-05-17 07:00:46 +00:00
Samuel Tardieu
c97b4761d8
excessive_precision: Fix false positive when exponent has leading zero ( #14824 )
...
Fixes rust-lang/rust-clippy#6341 .
changelog: [`excessive_precision`] no longer triggers on an exponent
with leading zeros
2025-05-17 05:56:05 +00:00
GrantBirki
604f0e2743
remove test_embedded_null_byte() test for now
2025-05-16 22:42:05 -07:00
Jubilee Young
0c157b51d3
aarch64-linux: Default to FramePointer::NonLeaf
...
For aarch64-apple and aarch64-windows, platform docs state that code
must use frame pointers correctly. This is because the AAPCS64 mandates
that a platform specify its frame pointer conformance requirements:
- Apple: https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms#Respect-the-purpose-of-specific-CPU-registers
- Windows: https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#integer-registers
- AAPCS64: 4492d1570e/aapcs64/aapcs64.rst (the-frame-pointer)
Unwinding code either requires unwind tables or frame pointers, and
on aarch64 the expectation is that one can use frame pointers for this.
Most Linux targets represent a motley variety of possible distributions,
so it is unclear who to defer to on conformance, other than perhaps Arm.
In the absence of a specific edict for a given aarch64-linux target,
Rust will assume aarch64-linux targets use non-leaf frame pointers.
This reflects what compilers like clang do.
2025-05-17 06:42:46 +02:00
Michael Hackner
e666b83b11
excessive_precision: Fix false positive when exponent has leading zero
2025-05-16 21:35:09 -07:00
Jack O'Connor
dcef449e2c
discuss deadlocks in the std::io::pipe() example
2025-05-16 20:59:45 -07:00
bors
a69bc17fb8
Auto merge of #141002 - GuillaumeGomez:subtree-update_cg_gcc_2025-05-14, r=GuillaumeGomez
...
Subtree update GCC backend 2025 05 14
cc `@antoyo`
2025-05-17 02:50:33 +00:00
Paul Mabileau
b1d7480acb
Docs(lib/extract_if): Unify example description
...
Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
2025-05-17 02:54:21 +02:00
Paul Mabileau
a9330dd0e9
Docs(lib/coll/hm): Add kv pair to extract_if's first sentence
...
Make it consistent in this regard with `BTreeMap`'s.
Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
2025-05-17 02:49:57 +02:00
Paul Mabileau
014434e96f
Docs(lib/extract_if): Unify paragraph about elements mutation
...
Take the one from `BTreeMap` that seems the best-worded and most
precise among the available variations.
Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
2025-05-17 02:45:56 +02:00
Paul Mabileau
9205ee27a8
Docs(lib/extract_if): Unify paragraph about closure actions
...
Also fixes `HashSet`'s that incorrectly designated itself as a `list`.
Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
2025-05-17 02:36:08 +02:00
Paul Mabileau
35f8473637
Docs(lib/coll/btm): Split extract_if's first sentence from the following ones
...
This also seems like a small mistake: the first main sentence is put in
the same paragraph as the other two following ones while other
equivalents all have it split. Therefore, do the same here.
Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
2025-05-17 02:29:37 +02:00
Paul Mabileau
cd5772e396
Docs(lib/coll/hm): Reword extract_if to use element instead of value
...
A minor change, but it seemed interesting to unify this one's
description, especially considering all the other equivalents use
`element` as well.
Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
2025-05-17 02:14:55 +02:00
Paul Mabileau
d29d1a332b
Docs(lib/alloc/vec): Add the missing an to extract_if's first sentence
...
As inspired by the equivalent methods from other collection types.
Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
2025-05-17 02:09:06 +02:00
bors
c8bda740ea
Auto merge of #140978 - davidtwco:deep-reject-in-match-norm-trait-ref, r=lcnr
...
trait_sel: deep reject `match_normalize_trait_ref`
Spotted during an in-person review of #137944 at RustWeek: `match_normalize_trait_ref` could be using `DeepRejectCtxt` to exit early as an optimisation for projection candidates, like is done with param candidates.
r? `@lcnr`
cc `@oli-obk`
2025-05-16 23:39:39 +00:00
GrantBirki
49658e6a3c
additional edge cases tests for path.rs
2025-05-16 15:19:44 -07:00
Samuel Tardieu
dcd8bb6d7e
Skip inner ordering checking in presence of #[repr(…)] ( #14610 )
...
A representation attribute `#[repr(…)]` might indicate that the ordering
of the fields or the variants is dictated by the API the code is
interfacing with. Better not lint with `arbitrary_source_item_ordering`
in this case.
changelog: [`arbitrary_source_item_ordering`]: do not lint inside items
with `#[repr]` attribute
2025-05-16 19:34:32 +00:00
bors
16d2276fa6
Auto merge of #140911 - rust-lang:cargo_update, r=clubby789
...
Weekly `cargo update`
Automation to keep dependencies in `Cargo.lock` current.
The following is the output from `cargo update`:
```txt
compiler & tools dependencies:
Locking 40 packages to latest compatible versions
Updating clap v4.5.37 -> v4.5.38
Updating clap_builder v4.5.37 -> v4.5.38
Updating ctrlc v3.4.6 -> v3.4.7
Updating derive_setters v0.1.6 -> v0.1.7
Updating getrandom v0.3.2 -> v0.3.3
Updating icu_collections v1.5.0 -> v2.0.0
Adding icu_locale_core v2.0.0
Updating icu_normalizer v1.5.0 -> v2.0.0
Updating icu_normalizer_data v1.5.1 -> v2.0.0
Updating icu_properties v1.5.1 -> v2.0.0
Updating icu_properties_data v1.5.1 -> v2.0.0
Adding icu_provider v2.0.0
Updating idna_adapter v1.2.0 -> v1.2.1
Updating jiff v0.2.12 -> v0.2.13
Updating jiff-static v0.2.12 -> v0.2.13
Updating libffi v4.0.0 -> v4.1.0
Updating libffi-sys v3.2.0 -> v3.3.1
Updating libloading v0.8.6 -> v0.8.7
Updating libm v0.2.13 -> v0.2.15
Adding litemap v0.8.0
Updating nix v0.29.0 -> v0.30.1
Adding potential_utf v0.1.2
Updating rustc-build-sysroot v0.5.4 -> v0.5.5
Adding tinystr v0.8.1
Updating tokio v1.44.2 -> v1.45.0
Updating unic-langid v0.9.5 -> v0.9.6
Updating unic-langid-impl v0.9.5 -> v0.9.6
Updating unic-langid-macros v0.9.5 -> v0.9.6
Updating unic-langid-macros-impl v0.9.5 -> v0.9.6
Removing utf16_iter v1.0.5
Adding wasm-encoder v0.230.0
Adding wasmparser v0.230.0
Updating wast v229.0.0 -> v230.0.0
Updating wat v1.229.0 -> v1.230.0
Updating winnow v0.7.9 -> v0.7.10
Removing write16 v1.0.0
Adding writeable v0.6.1
Adding yoke v0.8.0
Adding yoke-derive v0.8.0
Adding zerotrie v0.2.2
Adding zerovec v0.11.2
Adding zerovec-derive v0.11.1
note: pass `--verbose` to see 36 unchanged dependencies behind latest
library dependencies:
Locking 0 packages to latest compatible versions
note: pass `--verbose` to see 3 unchanged dependencies behind latest
rustbook dependencies:
Locking 26 packages to latest compatible versions
Updating cc v1.2.21 -> v1.2.22
Updating clap v4.5.37 -> v4.5.38
Updating clap_builder v4.5.37 -> v4.5.38
Updating clap_complete v4.5.48 -> v4.5.50
Updating getrandom v0.3.2 -> v0.3.3
Updating icu_collections v1.5.0 -> v2.0.0
Adding icu_locale_core v2.0.0
Removing icu_locid v1.5.0
Removing icu_locid_transform v1.5.0
Removing icu_locid_transform_data v1.5.1
Updating icu_normalizer v1.5.0 -> v2.0.0
Updating icu_normalizer_data v1.5.1 -> v2.0.0
Updating icu_properties v1.5.1 -> v2.0.0
Updating icu_properties_data v1.5.1 -> v2.0.0
Updating icu_provider v1.5.0 -> v2.0.0
Removing icu_provider_macros v1.5.0
Updating idna_adapter v1.2.0 -> v1.2.1
Updating jiff v0.2.12 -> v0.2.13
Updating jiff-static v0.2.12 -> v0.2.13
Updating litemap v0.7.5 -> v0.8.0
Adding potential_utf v0.1.2
Updating tinystr v0.7.6 -> v0.8.1
Removing utf16_iter v1.0.5
Updating web_atoms v0.1.1 -> v0.1.2
Updating winnow v0.7.9 -> v0.7.10
Removing write16 v1.0.0
Updating writeable v0.5.5 -> v0.6.1
Updating yoke v0.7.5 -> v0.8.0
Updating yoke-derive v0.7.5 -> v0.8.0
Adding zerotrie v0.2.2
Updating zerovec v0.10.4 -> v0.11.2
Updating zerovec-derive v0.10.3 -> v0.11.1
```
2025-05-16 19:34:19 +00:00
onur-ozkan
5027ee27de
bump bootstrap cc-rs to 1.2.23
...
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-16 18:08:20 +00:00
xizheyin
1c17324c7d
Create tests/ui/typeck/suggestions/ and move some tests in tests/ui/typeck/ to it
...
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-17 01:01:58 +08:00
xizheyin
742c27bc52
Do not emit help when shorthand from macro when suggest ? or expect
...
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-17 01:01:54 +08:00
satler
067fe1ffb5
add regression test for rust-lang#101650
2025-05-17 01:30:07 +09:00
bors
36ad75bceb
Auto merge of #141093 - weihanglo:update-cargo, r=weihanglo
...
Update cargo
5 commits in 056f5f4f3c100cb36b5e9aed2d20b9ea70aae295..47c911e9e6f6461f90ce19142031fe16876a3b95
2025-05-09 14:54:18 +0000 to 2025-05-14 17:53:17 +0000
- Stabilize doctest-xcompile (rust-lang/cargo#15462 )
- feat: skip `publish=false` pkg when publishing entire workspace (rust-lang/cargo#15525 )
- chore: bump to 0.90.0; update changelog (rust-lang/cargo#15520 )
- chore(triagebot): add `[no-mentions]` and `[note]` (rust-lang/cargo#15517 )
- add glob pattern support for known_hosts (rust-lang/cargo#15508 )
r? ghost
2025-05-16 16:20:00 +00:00
Weihang Lo
8604d458eb
Update cargo
2025-05-16 11:35:06 -04:00
Samuel Tardieu
604b7b0c5c
Extend cargo dev rename_lint ( #14633 )
...
Based on rust-lang/rust-clippy#14616
Extends `rename_lint` to handle more cases and makes `update_lints` sort
`deprecated_lints.rs`.
changelog: None
2025-05-16 15:06:30 +00:00
llogiq
94cfebb397
Rewrite non_copy_const ( #13207 )
...
fixes #12979
fixes #12951
fixes #13233
Tests still need to be finished and the docs still need to be updated,
but this should otherwise ready.
changelog: Lint `declare_interior_mutable_const` and
`borrow_interior_mutable_const` more precisely
2025-05-16 15:05:36 +00:00
Lukas Wirth
1d073db662
Merge pull request #19808 from Veykril/lw-ollszwnlmquw
...
ci: Run metrics on the beta channel
2025-05-16 15:00:07 +00:00
Lukas Wirth
45865f21e3
ci: Run metrics on the beta channel
...
This way we can catch regressions from upstream earlier
2025-05-16 16:49:05 +02:00
llogiq
5cb7e4039e
Reenable linting on UFCS deref calls ( #14808 )
...
Was disabled in rust-lang/rust-clippy#10855 due to a broken suggestion.
This will only lint if a type is not proveded (e.g. `T::deref`).
changelog: none
2025-05-16 14:47:34 +00:00
Alejandra González
5239b7fa2c
unnecessary_wraps: do not include the whole body in the lint span (#14777 )
...
Using the function declaration, by stripping the body, is enough to
convey the lint message.
changelog: [`unnecessary_wraps`]: do not include the whole body in the
lint span
Closes rust-lang/rust-clippy#14773
2025-05-16 14:24:58 +00:00
antoyo
7cc33bea9b
Merge pull request #676 from GuillaumeGomez/rdl_room
...
Add missing `add_eval` to generate `__rdl_oom` in the alloc error handler
2025-05-16 10:18:24 -04:00
Samuel Tardieu
feb70b51c4
match_same_arms, ifs_same_cond: lint once per same arm/condition (#14637 )
...
A large fraction of the lints emitted in CI lintcheck come from [this
`match`](https://github.com/unicode-rs/unicode-normalization/blob/v0.1.23/src/tables.rs#L34289 ),
currently for `n` same arms `((n - 1) * n)/2` lints are emitted, with
this change it will be emitted as a single lint
Also fixes https://github.com/rust-lang/rust-clippy/issues/13835
changelog: none
2025-05-16 14:16:45 +00:00
est31
258e880861
Remove #![feature(let_chains)] from library and src/librustdoc
2025-05-16 16:14:24 +02:00
Benoît du Garreau
5240cd3a82
Implement advance_by via try_fold for Sized iterators
...
When `try_fold` is overriden, it is usually easier for compilers to
optimize.
2025-05-16 15:46:44 +02:00
Lukas Wirth
4d5c63810b
Merge pull request #19807 from Veykril/lw-qyynkqysuyuy
...
fix: Don't overwrite `RUSTUP_TOOLCHAIN` if it is already set
2025-05-16 13:21:15 +00:00
Alex Macleod
39ab00a3a1
match_same_arms, ifs_same_cond: lint once per same arm/condition
2025-05-16 12:56:25 +00:00
bors
fc6bfe09aa
Auto merge of #140959 - oli-obk:no-unsafe-children, r=davidtwco
...
Invoke a query only when it doesn't return immediately anyway
This should cause less query key caching and less dep graph data, hopefully resulting in some perf improvements
2025-05-16 12:54:18 +00:00
sam skeoch
101e24a223
Add assert_unsafe_precondition!()s to as_ascii_unchecked() methods
2025-05-16 13:54:02 +01:00
sam skeoch
7d9f437f99
Add as_ascii_unchecked() methods to char, str, and u8
2025-05-16 13:53:32 +01:00
Lukas Wirth
10f4f6ae3d
fix: Don't overwrite RUSTUP_TOOLCHAIN if it is already set
2025-05-16 14:52:28 +02:00
joboet
2cdbd69abf
disable the stack overflow handler on miri
2025-05-16 14:25:15 +02:00
Ryan van Polen
a9225f8263
Updated feature flag and output of clippy/tests/ui/map_flatten*
2025-05-16 13:28:33 +02:00
Ryan van Polen
48538ed16b
Updated feature flag and output of clippy/tests/ui/map_flatten*
2025-05-16 13:28:33 +02:00
Guillaume Gomez
f0648966e4
Add missing add_eval to generate __rdl_oom in the alloc error handler
2025-05-16 13:02:20 +02:00
Jason Newcomb
27acbf2c66
Reenable linting on UFCS deref calls.
2025-05-16 06:45:08 -04:00
Jason Newcomb
13b070e356
clippy_dev: Fix previous renames in rename_lint
2025-05-16 06:43:55 -04:00
Jason Newcomb
b3f490202b
clippy_dev: order deprecated_lints.rs in update_lints
2025-05-16 06:43:52 -04:00
yukang
5f8954bc41
Fix the issue of typo of comma in arm parsing
2025-05-16 12:40:04 +02:00
Jason Newcomb
44681fd81b
Improve cargo dev rename_lint
...
* rename test files inside directories and ui-toml tests
* rename tests prefixed with the lint's name
* better module path renaming when renaming the lint's module
* partially delete lint files when uplifting
* rename ui_test error markers
2025-05-16 06:20:13 -04:00
Laurențiu Nicola
cea2aeb777
Merge pull request #19805 from lnicola/inline-format-args
...
minor: Inline some format args
2025-05-16 10:15:19 +00:00