about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-10Constify remaining operatorsltdk-6/+3
2025-08-10Constify remaining operatorsltdk-215/+441
2025-08-10Let forward_ref_* macros accept multiple attributes, and require attributes ↵ltdk-105/+156
explicitly
2025-08-10Use `eq_ignore_ascii_case` to avoid heap alloc in `detect_confuse_type`xizheyin-1/+1
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-08-10Auto merge of #144787 - Kobzol:codegen-backend-restructure, r=jieyouxubors-222/+304
Refactor codegen backends in bootstrap This PR refactors the codegen backend steps, in preparation to make more progress on the integration of the GCC codegen backend in bootstrap. It does several things: 1) Splits the `CodegenBackend` step into two, one for clif and another one for gcc. Even though their code is mostly similar, that's IMO mostly fake similarity, and they do (or will) ultimately require different handling. This was already visible in the requirement of building GCC for cg_gcc, of course. 2) It is now possible to build both backends (and dist cranelift) even if they are not specified in `rust.codegen-backends`. It was quite weird that it wasn't possible to even invoke the corresponding codegen backend if the backend wasn't specified in that array, as that array should ideally only change defaults (see later below). 3) Changes the path specification of these steps to an alias. In other words, instead of `compiler/rustc_codegen_cranelift`, the step is now built only using `rustc_codegen_cranelift` or `cg_clif`. This is done to avoid an annoying clash with `x build compiler`, which would otherwise build both codegen backends after the 2) change. 4) Made the copying of codegen backend artifacts more explicit, in particular in the `Assemble` step. 5) Codifies the semantics of `rust.codegen-backends`, which now only affects the defaults of whether a codegen backend will be included in rustc's sysroot and whether it will be disted in `x dist` by default. We can change the behavior later, e.g. to dist cranelift by default in `x dist` once it becomes stabilized. Currently I left the existing behavior that we use on CI, I just tried to document it better. I don't think that this requires a change tracker entry, because the defaults should work the same as before. It is just now possible to do `x build/dist rustc_codegen_cranelift` even if CLIF is not in the `codegen-backends` array. It is no longer possible to do `./x build compiler/rustc_codegen_cranelift` though, not sure if that requires a change tracker entry. There is one thing that I didn't touch yet, and that is the fact that `rust.codegen-backends` not only affects the default behavior of `x dist` w.r.t. Cranelift, but also of `x test`. In other words, `x test rustc_codegen_cranelift` still does not hing if cranelift isn't in `rust.codegen-backends`. I plan to take a look at this once I get to refactoring the test steps. r? `@jieyouxu`
2025-08-10Ignore coroutine witness type region args in auto trait confirmationMichael Goulet-2/+29
2025-08-10Merge pull request #4518 from rust-lang/rustup-2025-08-09Ben Kimock-15195/+19130
Automatic Rustup
2025-08-10Merge pull request #20409 from A4-Tacks/minicore-writeChayim Refael Friedman-0/+21
Add write! and writeln! to minicore
2025-08-09`suggest_borrow_generic_arg`: use the correct generic argsdianne-7/+53
2025-08-09Add gettid support for AndroidBen Kimock-3/+10
2025-08-10cargo updategithub-actions-69/+69
compiler & tools dependencies: Locking 18 packages to latest compatible versions Updating anstream v0.6.19 -> v0.6.20 Updating anstyle-query v1.1.3 -> v1.1.4 Updating anstyle-svg v0.1.9 -> v0.1.10 Updating anstyle-wincon v3.0.9 -> v3.0.10 Updating camino v1.1.10 -> v1.1.11 Updating clap v4.5.42 -> v4.5.43 Updating clap_builder v4.5.42 -> v4.5.43 Updating cxx v1.0.161 -> v1.0.166 Updating cxx-build v1.0.161 -> v1.0.166 Updating cxxbridge-cmd v1.0.161 -> v1.0.166 Updating cxxbridge-flags v1.0.161 -> v1.0.166 Updating cxxbridge-macro v1.0.161 -> v1.0.166 Updating derive-where v1.5.0 -> v1.6.0 Updating hashbrown v0.15.4 -> v0.15.5 Updating indenter v0.3.3 -> v0.3.4 Updating rustversion v1.0.21 -> v1.0.22 Updating scratch v1.0.8 -> v1.0.9 Updating zerovec v0.11.2 -> v0.11.4 note: pass `--verbose` to see 36 unchanged dependencies behind latest library dependencies: Locking 1 package to latest compatible version Updating hashbrown v0.15.4 -> v0.15.5 note: pass `--verbose` to see 2 unchanged dependencies behind latest rustbook dependencies: Locking 10 packages to latest compatible versions Updating anstream v0.6.19 -> v0.6.20 Updating anstyle-query v1.1.3 -> v1.1.4 Updating anstyle-wincon v3.0.9 -> v3.0.10 Updating cc v1.2.31 -> v1.2.32 Updating clap v4.5.42 -> v4.5.43 Updating clap_builder v4.5.42 -> v4.5.43 Updating clap_complete v4.5.55 -> v4.5.56 Updating hashbrown v0.15.4 -> v0.15.5 Updating rustversion v1.0.21 -> v1.0.22 Updating zerovec v0.11.2 -> v0.11.4
2025-08-09Auto merge of #145146 - fee1-dead-contrib:push-zmqrkurlzrxy, r=nnethercotebors-1056/+1043
remove `P` Previous work: rust-lang/rust#141603 MCP: https://github.com/rust-lang/compiler-team/issues/878 cc `@nnethercote`
2025-08-09fix &str type check in `from_str_radix_10` (#15410)Samuel Tardieu-3/+35
minor fix in `from_str_radix_10` lint, `is_type_diagnostic_item` only checks `Adt`, use `.is_str()` instead changelog: [`from_str_radix_10`]: properly lint references to `&str` as well
2025-08-09Fix an unstable feature comment that wasn't a doc commentJosh Triplett-1/+1
Every other feature in the list uses a doc comment; fix one that used a regular comment to use a doc comment.
2025-08-09Avoid abbreviating "numerator" as "numer", to allow catching typo "numer" ↵Josh Triplett-10/+8
elsewhere `typos.toml` has an exception for "numer", to avoid flagging its use as an abbreviation for "numerator". Remove the use of that abbrevation, spelling out "numerator" instead, and remove the exception, so that typo checks can find future instances of "numer" as a typo for "number".
2025-08-09`expect_fun_call`: move helper functions out of the main one (#15446)llogiq-38/+37
just a clean-up changelog: none
2025-08-09Add __addhf3, __subhf3, __mulhf3, __{eq,ge,gt,le,lt,ne,unord}hf2Trevor Gross-14/+85
LLVM does not currently emit these, but it is being discussed as an option on platforms where `f32` is not hardware supported. Glibc/libgcc also has the comparison functions [1] already. The generic implementations for addition, subtraction, and multiplication work for f16 without any complications, as do comparisons, so add them here. [1]: https://sourceware.org/git/?p=glibc.git;a=commit;h=6ec6c77867af4ddfec7323e0ac6ede89effca852
2025-08-09symcheck: Skip `__ymm@` symbols on WindowsTrevor Gross-1/+1
Like `__real@`, and `__xmm@`, Windows can emit duplicate `__ymm@` symbols for constants.
2025-08-09Adjust for codegen of unpredictable return valueAurelia Molzer-5/+31
It seems important for LLVM that we select on the values by-value instead of reading and have no intermediate store. So make sure the guards selects both potential drops but defers the return value to the second selection. Since the two options alias we use raw mutable pointers instead of mutable references as before.
2025-08-09introduce `path_to_local_with_projections`Ada Alakbarova-84/+60
combine two similar arms use in `eager_transmute` use in `double_ended_iterator_last` use different numbers in the new test case to avoid possible confusion move the other "unfixable" case as well; it shouldn't lint anyway, so having it in the main test file is fine
2025-08-09`HashMap`: also add "Usage with custom key types" headingAda Alakbarova-0/+2
2025-08-09`{BTree,Hash}Map`: add "`Entry` API" section headingAda Alakbarova-0/+4
2025-08-09improve "Documentation problem" issue template.binarycat-6/+6
rustdoc has its own issue template now, mention that. swap the order of the last two sentances so it reads more like a typical if/else chain (base case listed last). adjust some labels and descriptions
2025-08-09Add "PowerPC" to the list of valid CamelCase strings in docs (#15447)Alex Macleod-4/+4
``` changelog: [`doc-valid-idents`]: add "PowerPC" to the list of words not considered as identifiers ``` --- changelog: add "PowerPC" to the list of words not considered as identifiers by `doc-valid-idents` rule
2025-08-10Update CONTRIBUTING.md to use RustRover instead of IntelliJ Rustreddevilmidzy-8/+8
JetBrains has transitioned from the IntelliJ Rust plugin to RustRover as their dedicated Rust IDE. This updates the documentation to reflect this change while maintaining backward compatibility with the existing cargo dev setup intellij command. Changes: - Replace IntelliJ Rust references with RustRover in CONTRIBUTING.md - Update links to point to official RustRover homepage - Update development guide in book/src/development/basics.md - Keep existing command names for backward compatibility
2025-08-09Fix a clippy::needless_borrowBen Kimock-1/+1
2025-08-09Remove cfg(bootstrap) for strict_overflow_opsBen Kimock-1/+0
2025-08-09Ensure consistent drop for hint::select_unpredictableAurelia Molzer-1/+42
There are a few alternatives to the implementation. The principal problem is that the selected value must be owned (in the sense of having any drop flag of sorts) when the unselected value is dropped, such that panic unwind goes through the drop of both. This ownership must then be passed on in return when the drop went smoothly. The basic way of achieving this is by extracting the selected value first, at the cost of relying on the optimizer a little more for detecting the copy as constructing the return value despite having a place in the body.
2025-08-09Implement next trait solverjackh726-1309/+19140
2025-08-09Apply suggestions from code reviewjyn-3/+3
Co-authored-by: Florian Bartels <108917393+flba-eb@users.noreply.github.com> Co-authored-by: Mads Marquart <mads@marquart.dk>
2025-08-09Add "PowerPC" to the list of valid CamelCase strings in docsDave Rolsky-4/+4
2025-08-09[[infinite_loop] fix infinite loop false positive (#15157)dswij-6/+137
changelog: [infinite_loop]: Improve handling of infinite loops in async blocks Fix rust-lang/rust-clippy#14000 This PR refines the [infinite_loop] lint to avoid false positives when infinite loops occur inside async blocks that are not awaited (such as those that are spawned or assigned to variables for later use). The lint will now only trigger when the async block containing the loop is directly awaited.
2025-08-09some `derive_more` refactorsDeadbeef-100/+180
some clauses can be merged together without requiring an attribute for each trait derived. also manually impl `Eq` because the `derive_where` generated code is too much for my comfort
2025-08-09Do not attempt to compute size of a type with escaping lifetimes (#15434)Jason Newcomb-3/+14
A type with escaping bound vars cannot be wrapped in a dummy binder during size computation. Fixes rust-lang/rust-clippy#15429 changelog: [`zero_sized_hashmap_values`]: fix ICE in types with escaping lifetimes r? Jarcho <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_SUMMARY_START --> ### Summary Notes - [Beta nomination](https://github.com/rust-lang/rust-clippy/pull/15434#issuecomment-3164866684) by [samueltardieu](https://github.com/samueltardieu) *Managed by `@rustbot`—see [help](https://forge.rust-lang.org/triagebot/note.html) for details* <!-- TRIAGEBOT_SUMMARY_END --> <!-- TRIAGEBOT_END -->
2025-08-09add review commentsbit-aloo-44/+11
2025-08-09Change days-threshold to 28 in [behind-upstream]xizheyin-1/+1
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-08-09commentsKivooeo-30/+96
2025-08-09Override custom Cargo `build-dir` in bootstrapJakub Beránek-0/+9
2025-08-09`expect_fun_call`: move helper functions out of the main oneAda Alakbarova-38/+37
allows removing the `#[allow(clippy::too_many_lines)]`
2025-08-09Merge pull request #20412 from ↵Lukas Wirth-1/+29
Hmikihiro/fix_generate_function_generate_by_indent_token fix: generate function by indet token
2025-08-09Auto merge of #145142 - Zalathar:rollup-oi6s8kg, r=Zalatharbors-1695/+1270
Rollup of 23 pull requests Successful merges: - rust-lang/rust#141658 (rustdoc search: prefer stable items in search results) - rust-lang/rust#141828 (Add diagnostic explaining STATUS_STACK_BUFFER_OVERRUN not only being used for stack buffer overruns if link.exe exits with that exit code) - rust-lang/rust#144823 (coverage: Extract HIR-related helper code out of the main module) - rust-lang/rust#144883 (Remove unneeded `drop_in_place` calls) - rust-lang/rust#144923 (Move several more float tests to floats/mod.rs) - rust-lang/rust#144988 (Add annotations to the graphviz region graph on region origins) - rust-lang/rust#145010 (Couple of minor abi handling cleanups) - rust-lang/rust#145017 (Explicitly disable vector feature on s390x baseline of bad-reg test) - rust-lang/rust#145027 (Optimize `char::is_alphanumeric`) - rust-lang/rust#145050 (add member constraints tests) - rust-lang/rust#145073 (update enzyme submodule to handle llvm 21) - rust-lang/rust#145080 (Escape diff strings in MIR dataflow graphviz) - rust-lang/rust#145082 (Fix some bad formatting in `-Zmacro-stats` output.) - rust-lang/rust#145083 (Fix cross-compilation of Cargo) - rust-lang/rust#145096 (Fix wasm target build with atomics feature) - rust-lang/rust#145097 (remove unnecessary `TypeFoldable` impls) - rust-lang/rust#145100 (Rank doc aliases lower than equivalently matched items) - rust-lang/rust#145103 (rustc_metadata: remove unused private trait impls) - rust-lang/rust#145115 (defer opaque type errors, generally greatly reduce tainting) - rust-lang/rust#145119 (rustc_public: fix missing parenthesis in pretty discriminant) - rust-lang/rust#145124 (Recover `for PAT = EXPR {}`) - rust-lang/rust#145132 (Refactor map_unit_fn lint) - rust-lang/rust#145134 (Reduce indirect assoc parent queries) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-09Stabilize featureKivooeo-17/+4
2025-08-09remove `P`Deadbeef-29/+28
2025-08-09remove `P`Deadbeef-1056/+1043
2025-08-09Replace unsafe function with safe alternativeChris Denton-12/+11
The `security_attributes` function is marked as safe despite taking a raw pointer which will later be used. Fortunately this function is only used internally and only in one place that has been basically the same for a decade now. However, we only ever set one bool so it's easy enough to replace with something that's actually safe.
2025-08-09fix: generate function by indet tokenHmikihiro-1/+29
2025-08-09add nonpoison and poison rwlock testsConnor Tsui-280/+381
Adds tests for the `nonpoison::RwLock` variant by using a macro to duplicate the existing `poison` tests. Note that all of the tests here are adapted from the existing `poison` tests.
2025-08-09reorganize rwlock testsConnor Tsui-336/+348
This commit simply helps discern the actual changes needed to test both poison and nonpoison `rwlock`s.
2025-08-09add `nonpoison::rwlock` implementationConnor Tsui-8/+1094
Adds the equivalent `nonpoison` types to the `poison::rwlock` module. These types and implementations are gated under the `nonpoison_rwlock` feature gate. Also blesses the ui tests that now have a name conflicts (because these types no longer have unique names). The full path distinguishes the different types.
2025-08-09rename `TraitRef::from_method` to `from_assoc`Deadbeef-13/+13
also add a note to `GenericArgs::truncate_to`