Commit graph

308340 commits

Author SHA1 Message Date
Ada Alakbarova
75b68606bc
add an unfixable case
as recommended in
https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/problem.20when.20suggestion.20only.20removes.20one.20.22level.22.20of.20a.20lint/near/532894687
2025-09-28 12:11:02 +02:00
Ada Alakbarova
554680683f
remember all the nested types while we loop
see https://rust-lang.zulipchat.com/#narrow/channel/25732
2025-09-28 12:11:02 +02:00
Ada Alakbarova
9a1b2bcc9f
peel _all_ extra &muts
see
https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/problem.20when.20suggestion.20only.20removes.20one.20.22level.22.20of.20a.20lint/near/532889973
2025-09-28 12:11:02 +02:00
Ada Alakbarova
4053c44654
misc: import more from hir 2025-09-28 12:11:02 +02:00
Ada Alakbarova
c6971c22c1
only lint once on 3+ &muts
for some reason this seems to already be the case with exprs, so only do
it for tys
2025-09-28 12:11:02 +02:00
Ada Alakbarova
729d92cf04
sugg on ty 2025-09-28 12:11:01 +02:00
Ada Alakbarova
269870a5f9
fix: don't lint in macro calls 2025-09-28 12:11:00 +02:00
Ada Alakbarova
70be286cef
sugg on expr 2 2025-09-28 12:11:00 +02:00
Ada Alakbarova
a4fba850a9
sugg on expr 1 2025-09-28 12:11:00 +02:00
Ada Alakbarova
bb1081e5a9
move unfixable stuff to a separate file 2025-09-28 12:11:00 +02:00
Ada Alakbarova
b613be223d
fix a bug while we're at it 2025-09-28 11:30:47 +02:00
Shunpoco
5e9cab3921 modify ensure_version_or_cargo_install to check existing binary
Current implementation uses bin_name to check if it exists,
but it should use tool_root_dir/tool_bin_dir/bin_name instead.
Otherwise the check fails every time, hence the function falls back to
install the binary.
2025-09-28 09:46:20 +01:00
Zalathar
8b1879864b tool_check_step! no longer needs a builder to determine mode 2025-09-28 17:18:07 +10:00
Zalathar
193f7179cc Build and test compiletest as a stage0 bootstrap tool 2025-09-28 17:18:07 +10:00
Zalathar
7b8ae74da1 Add a bootstrap snapshot test for x test compiletest 2025-09-28 17:18:07 +10:00
Zalathar
e99364ea35 Remove old-output-capture from compiletest 2025-09-28 17:18:07 +10:00
Zalathar
cc7bd291cd Fix change-tracker entry for 147046 2025-09-28 17:18:07 +10:00
Matthias Krüger
f4032bcb8a
Rollup merge of #147110 - SebastianSpeitel:patch-1, r=saethlin
Fix typo

Noticed this when looking at the source on doc.rust-lang.org
2025-09-28 09:15:30 +02:00
Matthias Krüger
f31963ff82
Rollup merge of #147098 - Shunpoco:issue-147088, r=Kobzol
Add auto extra-checks in pre-push hook

Fixes rust-lang/rust#147088

This PR adds auto py, cpp, and js extra checks into the pre-push script.
- It checks those non-Rust files only if they are modified in the commit
- Thanks to auto mode, the pre-push doesn't check them if none of them are modified. It means that it doesn't build venv, nor install node_packages under build/

Note that this PR doesn't add shellcheck and spellcheck, because
- Currently shellcheck isn't installed by the tidy command unlike venv/node_modules. So it forces developers to take a extra task to enable pre-push hook
- Spellcheck is built whenever I kick test tidy with the option. If I enables it, developers should wait extra time for running pre-push hook
2025-09-28 09:15:30 +02:00
Matthias Krüger
641bedabb1
Rollup merge of #147095 - fmease:libprivrepr, r=dtolnay
Library: Remove remaining private `#[repr]` workarounds

With https://github.com/rust-lang/rust/pull/116882 finally merged, gating these `repr`s behind cfg `not(doc)` is no longer necessary to achieve a private repr.

Follow up to https://github.com/rust-lang/rust/pull/128046 (that was enabled via https://github.com/rust-lang/rust/pull/115439). With that, https://github.com/rust-lang/rust/pull/116743 is now fully realized at long last.

cc ``@dtolnay``
2025-09-28 09:15:29 +02:00
Matthias Krüger
f22af64853
Rollup merge of #147093 - jackpot51:redox-path, r=bjorn3
redox: switch to colon as path separator

We recently changed this in order to better comply with assumptions about Unix-like systems. The current PATH is set to `/usr/bin` with no separators in order to ease the transition.
2025-09-28 09:15:29 +02:00
Matthias Krüger
925951dddc
Rollup merge of #147086 - Zalathar:payload, r=jieyouxu
compiletest: Use `PanicHookInfo::payload_as_str` now that it's stable in beta

Nice little FIXME cleanup after the bootstrap beta bump to 1.91 in https://github.com/rust-lang/rust/pull/146636.

r? jieyouxu
2025-09-28 09:15:28 +02:00
Matthias Krüger
ad864de2c3
Rollup merge of #147082 - danielverkamp:fmt-alternate-octal-binary-mixup, r=Noratrieb
formatting_options: fix alternate docs 0b/0o mixup

The descriptions of the alternate forms of Octal and Binary were swapped in the doc comment for FormattingOptions::alternate().
2025-09-28 09:15:27 +02:00
Matthias Krüger
93fff3db2a
Rollup merge of #147081 - moturus:fix_md, r=workingjubilee
doc: fix a typo in platform-support.md

Fix a typo.
2025-09-28 09:15:27 +02:00
Matthias Krüger
194bd775cb
Rollup merge of #147066 - SimonSapin:macro_attr-tracking, r=lqd
Fix tracking issue number for feature(macro_attr)

The ability to define an attribute macro with `macro_rules!` is tracked at https://github.com/rust-lang/rust/issues/143547, not https://github.com/rust-lang/rust/issues/83527
2025-09-28 09:15:26 +02:00
Matthias Krüger
cb4c3ad41c
Rollup merge of #147061 - lcnr:provisional-cache-woops, r=BoxyUwU
fix rebasing cycle heads when not reaching a fixpoint

fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/232

annoyingly subtle, imagine the following proof tree

- A (no cycle head usages, final result Y)
  - *ignored* B (depends on A with provisional result X)
    - A (cycle, provisional result X)
- B (using the cache entry here incorrectly assumes A has final result X)

r? ``@BoxyUwU``
2025-09-28 09:15:25 +02:00
Matthias Krüger
f349faa25f
Rollup merge of #146942 - yotamofek:pr/rustdoc/finish_deprecating_write_str, r=GuillaumeGomez
[rustdoc] Finish getting rid of usages `write_str`

This PR, along with rust-lang/rust#146933 , get rid of all the last usages of the `write_str` fn that was introduced back in rust-lang/rust#136784 .

This *shouldn't* be rolled up along with rust-lang/rust#146933 , since the later of the two to be merged will need to delete the no-longer-used `write_str` fn.
Commits can be reviewed separately.
2025-09-28 09:15:25 +02:00
Matthias Krüger
0fd939658e
Rollup merge of #146788 - sysrex:146756/discord_invite, r=workingjubilee
chore: removes deprecated discord.

This PR just changes the wording of the contributing document to remove the deprecated Discord.

Fixes https://github.com/rust-lang/rust/issues/146756.
2025-09-28 09:15:24 +02:00
Matthias Krüger
e8578c8808
Rollup merge of #146763 - Zalathar:di-builder, r=jdonszelmann
cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 5)

- Part of rust-lang/rust#134001
- Follow-up to rust-lang/rust#146673

---

This is another batch of LLVMDIBuilder binding migrations, replacing some our own LLVMRust bindings with bindings to upstream LLVM-C APIs.

Some of these are a little more complex than most of the previous migrations, because they split one LLVMRust binding into multiple LLVM bindings, but nothing too fancy.

This appears to be the last of the low-hanging fruit. As noted in https://github.com/rust-lang/rust/issues/134001#issuecomment-2524979268, the remaining bindings are difficult or impossible to migrate at present.
2025-09-28 09:15:23 +02:00
Matthias Krüger
4eddf645bf
Rollup merge of #146745 - helldawg:master, r=workingjubilee
Clarified error note for usize range matching

Fixes rust-lang/rust#146476

This is kinda rough, but it gets the point across a little better and stays short.
2025-09-28 09:15:23 +02:00
Matthias Krüger
4e9cfc726c
Rollup merge of #142139 - erickt:include-hashes, r=Mark-Simulacrum
Include additional hashes in src/stage0

This patch changes `bump-stage0` to include:

* The sha256 hash of the channel manifest used to create `src/stage0`.
* The rust and rustfmt git commit in `src/stage0`.
* Hashes of all the artifacts, like the source tarball, in `src/stage0`.

Combined this will allow for:

* Projects that bootstrap their own compiler, such as Fuchsia, or users of [bootstrap], to build their compilers offline without needing to communicate with static.rust-lang.org.

* Auditors to detect if the channel manifest, and all the artifacts inside the manifest, were modified after it was used to generate `src/stage0`. Furthermore, if they did find modified artifacts, they could determine if the Rust Signing Key was compromised by checking if any modified file was signed properly.

finally, it allows regeneration of `src/stage0` when specifying both the day of the build for rust, and the day of the build for rustfmt, which can allow a maintainer to regenerate `src/stage0` to verify nothing changed.

[bootstrap]: https://github.com/dtolnay/bootstrap
[mrustc]: https://github.com/thepowersgang/mrustc
2025-09-28 09:15:22 +02:00
bors
4ffeda10e1 Auto merge of #147045 - notriddle:search-index-entrydata-path, r=GuillaumeGomez
rustdoc-search: use the same ID for entry and path to same item

This decreases the size of the compiler-doc from 57MiB to 56MiB.

r? `@GuillaumeGomez`
2025-09-28 07:13:23 +00:00
Ada Alakbarova
82b2eb13f8
add structured suggestions 2025-09-28 08:59:12 +02:00
Ada Alakbarova
6a6b4a3ba8
combine the Call and MethodCall cases 2025-09-28 08:56:48 +02:00
Ada Alakbarova
dbef783309
call args "args" in the Call case as well
since that's what they are
2025-09-28 08:56:48 +02:00
Ada Alakbarova
77c96c031b
clean-up 2025-09-28 08:56:47 +02:00
Oli Scherer
264162ee30
Merge pull request #4607 from rust-lang/rustup-2025-09-28
Automatic Rustup
2025-09-28 05:27:01 +00:00
Jubilee Young
b3f3e36c72 compiler: remove AbiAlign inside TargetDataLayout
This maintains AbiAlign usage in public API and most of the compiler,
but direct access of these fields is now in terms of Align only.
2025-09-27 22:13:53 -07:00
The Miri Cronjob Bot
9762c4349b Merge ref '848e6746fe' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 848e6746fe
Filtered ref: 8a7a804ec197b593f553a523e3f76baf5fd56d0e
Upstream diff: b733736ea2...848e6746fe

This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-28 05:00:31 +00:00
The Miri Cronjob Bot
5debc4368c Prepare for merging from rust-lang/rust
This updates the rust-version file to 848e6746fe.
2025-09-28 04:52:54 +00:00
bors
c7f6aa2869 Auto merge of #147042 - Noratrieb:untrack-caller-vec, r=tgross35
Remove most `#[track_caller]` from allocating Vec methods

They cause significant binary size overhead while contributing little value.

closes rust-lang/rust#146963, see that issue for more details.
2025-09-28 03:23:45 +00:00
Nik Revenco
0d658fe156 test: add keyword/soup.rs 2025-09-28 02:41:12 +01:00
WANG Rui
c1259aa26f Add LSX accelerated implementation for source file analysis
This patch introduces an LSX-optimized version of `analyze_source_file`
for the `loongarch64` target. Similar to existing SSE2 implementation
for x86, this version:

- Processes 16-byte chunks at a time using LSX vector intrinsics.
- Quickly identifies newlines in ASCII-only chunks.
- Falls back to the generic implementation when multi-byte UTF-8
  characters are detected or in the tail portion.
2025-09-28 09:35:07 +08:00
A4-Tacks
fdacc0cf5f
Add all any and not attribute completions
Example
---
`#[cfg($0)]` -> `#[cfg(any($0))]`
2025-09-28 08:42:18 +08:00
Jeremy Fitzhardinge
1d7c1afde0 Implement volatile_composites lint
Volatile reads and writes to non-primitive types are not well-defined, and can cause problems.

See https://github.com/rust-lang/rust-clippy/issues/15529 for more details.
2025-09-27 16:22:00 -07:00
Sebastian Speitel
3a20a4d0a5
Fix typo 2025-09-28 00:51:57 +02:00
bors
848e6746fe Auto merge of #147104 - matthiaskrgr:rollup-gap1v0w, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#146037 (Introduce CoerceShared lang item and trait, and basic Reborrow tests)
 - rust-lang/rust#146732 (tests: relax expectations after llvm change 902ddda120a5)
 - rust-lang/rust#147018 (re-order normalizations in run-make linker-warning test)
 - rust-lang/rust#147032 (Fix doctest compilation time display)
 - rust-lang/rust#147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`)
 - rust-lang/rust#147050 (PassWrapper: update for new PGOOptions args in LLVM 22)
 - rust-lang/rust#147075 (Make `def_path_hash_to_def_id` not panic when passed an invalid hash)
 - rust-lang/rust#147076 (update issue number for more_float_constants)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-27 22:30:56 +00:00
Boxy Uwu
4d41177513 Rename various "concrete opaque type" terminology to say "hidden type" 2025-09-27 22:58:02 +01:00
Jules Bertholet
4d32b9a178
Hoist non-platform-specific code out of thread_local_inner! 2025-09-27 17:05:39 -04:00
David Carlier
19d0e72849
fix build for android 2025-09-27 20:38:45 +01:00