about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-06-07Auto merge of #141964 - sayantn:update-stdarch, r=Amanieubors-6/+0
Update stdarch submodule Updates the stdarch submodule. ## Merged PRs - rust-lang/stdarch#1797 - rust-lang/stdarch#1758 - rust-lang/stdarch#1798 - rust-lang/stdarch#1811 - rust-lang/stdarch#1810 - rust-lang/stdarch#1807 - rust-lang/stdarch#1806 - rust-lang/stdarch#1812 - rust-lang/stdarch#1795 - rust-lang/stdarch#1796 - rust-lang/stdarch#1813 - rust-lang/stdarch#1816 - rust-lang/stdarch#1818 - rust-lang/stdarch#1820 - rust-lang/stdarch#1819 r? `@Amanieu` `@rustbot` label T-libs-api Closes rust-lang/rust#111137
2025-06-07bless non-Linux testsRalf Jung-21/+19
2025-06-07make better use of label for data-race and some other errorsRalf Jung-388/+240
2025-06-07diagnostics: do not repeat the entire message in the span labelRalf Jung-578/+581
2025-06-07const-eval error: always say in which item the error occurredRalf Jung-2/+2
also adjust the wording a little so that we don't say "the error occurred here" for two different spans
2025-06-07Auto merge of #141917 - petrochenkov:nobinroot, r=jieyouxubors-4/+2
bootstrap: Remove `rustc_snapshot_libdir` from PATH in one more place Same as https://github.com/rust-lang/rust/pull/141657 but in a different part of the build system, with the same goal of addressing [#t-infra/bootstrap > Build broken in MSYS2 @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Build.20broken.20in.20MSYS2/near/520709527). It seems to work on windows-{gnu,msvc} and linux-gnu at least. r? jieyouxu
2025-06-07test_dup: ensure the FDs remain in sync even after dup'ingRalf Jung-2/+3
2025-06-07Auto merge of #142142 - jhpratt:rollup-frlezq2, r=jhprattbors-0/+3
Rollup of 8 pull requests Successful merges: - rust-lang/rust#137992 (Stabilise `os_string_pathbuf_leak`) - rust-lang/rust#141558 (Limit the size of cgu names when using the `-Zhuman-readable-cgu-name…) - rust-lang/rust#141797 (compiler: set Apple frame pointers by architecture) - rust-lang/rust#141857 (coretests: move float tests from num to floats module and use a more flexible macro to generate them) - rust-lang/rust#142045 (Make obligation cause code suggestions verbose) - rust-lang/rust#142076 (Check documentation of bootstrap in PR CI) - rust-lang/rust#142110 (Add solaris targets to build-manifest) - rust-lang/rust#142131 (Make cast suggestions verbose) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-07Rollup merge of #142110 - psumbera:solaris-ci-build4, r=marcoieniJacob Pratt-0/+2
Add solaris targets to build-manifest this is follow up for: https://github.com/rust-lang/rust/pull/138699
2025-06-07Rollup merge of #142076 - Kobzol:doc-bootstrap-ci, r=marcoieniJacob Pratt-0/+1
Check documentation of bootstrap in PR CI It's annoying when wrong doc comments in bootstrap [break](https://github.com/rust-lang/rust/pull/141272#issuecomment-2943614152) `auto` CI. This has happened a few times recently, and documenting bootstrap with the stage0 compiler should be pretty quick, so let's add it to PR CI. r? ``@marcoieni``
2025-06-07fmtThe Miri Cronjob Bot-3/+10
2025-06-07Merge from rustcThe Miri Cronjob Bot-2148/+2372
2025-06-07Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-06-07Auto merge of #141910 - Kobzol:new-bors-try-branch-name-doc, r=marcoienibors-1/+2
Fix `create-docs-artifacts.sh` with new bors The slashes in the branch name (`automation/bors/try`) were causing issues for this script (https://github.com/rust-lang/rust/actions/runs/15391908130/job/43303193243). r? `@marcoieni` try-job: `mingw-check*`
2025-06-06Add `-Z hint-mostly-unused` to tell rustc that most of a crate will go unusedJosh Triplett-0/+33
This hint allows the compiler to optimize its operation based on this assumption, in order to compile faster. This is a hint, and does not guarantee any particular behavior. This option can substantially speed up compilation if applied to a large dependency where the majority of the dependency does not get used. This flag may slow down compilation in other cases. Currently, this option makes the compiler defer as much code generation as possible from functions in the crate, until later crates invoke those functions. Functions that never get invoked will never have code generated for them. For instance, if a crate provides thousands of functions, but only a few of them will get called, this flag will result in the compiler only doing code generation for the called functions. (This uses the same mechanisms as cross-crate inlining of functions.) This does not affect `extern` functions, or functions marked as `#[inline(never)]`. Some performance numbers, based on a crate with many dependencies having just *one* large dependency set to `-Z hint-mostly-unused` (using Cargo's `profile-rustflags` option): A release build went from 4m07s to 2m04s. A non-release build went from 2m26s to 1m28s.
2025-06-07Auto merge of #142133 - GuillaumeGomez:rollup-fvzdren, r=GuillaumeGomezbors-27/+33
Rollup of 11 pull requests Successful merges: - rust-lang/rust#140418 (Reexport types from `c_size_t` in `std`) - rust-lang/rust#141471 (unsafe keyword docs: emphasize that an unsafe fn in a trait does not get to choose its safety contract) - rust-lang/rust#141603 (Reduce `ast::ptr::P` to a typedef of `Box`) - rust-lang/rust#142043 (Verbose suggestion to make param `const`) - rust-lang/rust#142086 (duduplicate more AST visitor methods) - rust-lang/rust#142103 (Update `InterpCx::project_field` to take `FieldIdx`) - rust-lang/rust#142105 (remove extraneous text) - rust-lang/rust#142112 (fix typo) - rust-lang/rust#142113 (Reduce confusion of some drop order tests) - rust-lang/rust#142114 (Compute number of digits instead of relying on constant value for u128 display code) - rust-lang/rust#142118 (rustc_lexer: typo fix + small cleanups) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-06Rollup merge of #142103 - scottmcm:fieldidx-in-interp, r=oli-obkGuillaume Gomez-24/+30
Update `InterpCx::project_field` to take `FieldIdx` As suggested by Ralf in https://github.com/rust-lang/rust/pull/142005#discussion_r2125839015
2025-06-06Rollup merge of #141603 - nnethercote:reduce-P, r=fee1-deadGuillaume Gomez-3/+3
Reduce `ast::ptr::P` to a typedef of `Box` As per the MCP at https://github.com/rust-lang/compiler-team/issues/878. r? `@fee1-dead`
2025-06-06Auto merge of #141800 - workingjubilee:build-std-with-less-leaf-pointers, ↵bors-1/+2
r=saethlin bootstrap: build std sans leaf frame pointers Sometimes leaf frame-pointers can impact LLVM inlining choices, and that can be a real problem for things like `mul_add`.
2025-06-06In "Fill match arms", allow users to prefer `Self` to the enum name when ↵Chayim Refael Friedman-29/+227
possible But default to not to. I chose to have a more generic config name because maybe other assists could also use the same approach.
2025-06-06bootstrap: fix tracing importsJieyou Xu-4/+0
2025-06-06Auto merge of #142099 - matthiaskrgr:rollup-r9s3c35, r=matthiaskrgrbors-134/+109
Rollup of 11 pull requests Successful merges: - rust-lang/rust#125087 (Optimize `Seek::stream_len` impl for `File`) - rust-lang/rust#141982 (`tests/ui`: A New Order [5/N]) - rust-lang/rust#142012 (Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of None) - rust-lang/rust#142044 (compiler: Document the offset invariant of `OperandValue::Pair`) - rust-lang/rust#142047 (Ensure stack in two places that affect s390x) - rust-lang/rust#142058 (Clean `rustc_attr_parsing/src/lib.rs` documentation) - rust-lang/rust#142067 (canon_abi: make to_erased_extern_abi just a detail in formatting) - rust-lang/rust#142072 (doc: Fix inverted meaning in E0783.md) - rust-lang/rust#142084 (add myself to rotation) - rust-lang/rust#142091 (Fix AIX build) - rust-lang/rust#142092 (rustdoc: Support middle::ty associated const equality predicates again) Failed merges: - rust-lang/rust#142042 (Make E0621 missing lifetime suggestion verbose) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-06add solaris targets to build-manifestPetr Sumbera-0/+2
2025-06-06Merge pull request #4378 from RalfJung/flockRalf Jung-105/+50
use File::lock to implement flock, and add a test for File::lock
2025-06-06use File::lock to implement flock, and add a test for File::lockRalf Jung-105/+50
2025-06-06Make `Semantics<'db, dyn HirDatabase>` actually usableVincent Esche-2/+18
2025-06-06Merge pull request #19908 from ↵Lukas Wirth-25/+190
rmehri01/rmehri01/diagnostic_attribute_completions feat: implement attribute completions for diagnostics module
2025-06-06Update cargoWeihang Lo-0/+0
2025-06-06Merge pull request #19937 from Veykril/push-rvnylnlnxxyrLukas Wirth-10/+28
fix: Record macro calls for fields in `ChildBySource` impls
2025-06-06Merge pull request #19935 from ChayimFriedman2/exp-diag-show-quickfixLukas Wirth-2/+12
fix: Always include quickfixes for diagnostics, even when diagnostics are disabled
2025-06-06fix: Record macro calls for fields in `ChildBySource` implsLukas Wirth-10/+28
2025-06-06Merge from rustcThe Miri Cronjob Bot-326/+532
2025-06-06Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-06-06Auto merge of #141272 - Shourya742:2025-05-18-modularize-config-module, r=Kobzolbors-1986/+2228
modularize the config module bootstrap Currently, our `config` module is quite large over 3,000 lines, and handles a wide range of responsibilities. This PR aims to break it down into smaller, more focused submodules to improve readability and maintainability: * **`toml`**: Introduces a dedicated `toml` submodule within the `config` module. Its sole purpose is to define configuration-related structs along with their corresponding deserialization logic. It also contains the `parse_inner` method, which serves as the central function for extracting relevant information from the TOML structs and constructing the final configuration. * **`rust`, `dist`, `install`, `llvm`, `build`, `gcc`, and others**: Each of these modules contains TOML subsections specific to their domain, along with the logic necessary to convert them into parts of the final configuration struct. * **`config/mod.rs`**: Contains shared types and enums used across multiple TOML subsections. * **`config/config.rs`**: Houses the logic that integrates all the TOML subsections into the complete configuration struct. r? `@kobzol`
2025-06-05Update `InterpCx::project_field` to take `FieldIdx`Scott McMurray-24/+30
As suggested by Ralf in 142005.
2025-06-06Stabilize unlinked file diagnosticChayim Refael Friedman-0/+1
2025-06-06Always include quickfixes for diagnostics, even when diagnostics are disabledChayim Refael Friedman-2/+12
2025-06-06Add new Tier-3 targets: `loongarch32-unknown-none*`WANG Rui-15/+44
MCP: https://github.com/rust-lang/compiler-team/issues/865
2025-06-06Rollup merge of #142092 - fmease:rustdoc-alias-terms, r=GuillaumeGomezMatthias Krüger-131/+106
rustdoc: Support middle::ty associated const equality predicates again Fix intentional regression from PR rust-lang/rust#125076. Fixes rust-lang/rust#125092. Fixes rust-lang/rust#134775. CC rust-lang/rust#141368 (`EqPredicates` and rustdoc).
2025-06-06Rollup merge of #142012 - oli-obk:no-optional-spans, r=fee1-deadMatthias Krüger-3/+3
Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of None Turns out many locations actually have a span available that we could use, so I used it
2025-06-05Auto merge of #138677 - shepmaster:consistent-elided-lifetime-syntax, ↵bors-47/+56
r=traviscross,jieyouxu Add a new `mismatched-lifetime-syntaxes` lint The lang-team [discussed this](https://hackmd.io/nf4ZUYd7Rp6rq-1svJZSaQ) and I attempted to [summarize](https://github.com/rust-lang/rust/pull/120808#issuecomment-2701863833) their decision. The summary-of-the-summary is: - Using two different kinds of syntax for elided lifetimes is confusing. In rare cases, it may even [lead to unsound code](https://github.com/rust-lang/rust/issues/48686)! Some examples: ```rust // Lint will warn about these fn(v: ContainsLifetime) -> ContainsLifetime<'_>; fn(&'static u8) -> &u8; ``` - Matching up references with no lifetime syntax, references with anonymous lifetime syntax, and paths with anonymous lifetime syntax is an exception to the simplest possible rule: ```rust // Lint will not warn about these fn(&u8) -> &'_ u8; fn(&'_ u8) -> &u8; fn(&u8) -> ContainsLifetime<'_>; ``` - Having a lint for consistent syntax of elided lifetimes will make the [future goal](https://github.com/rust-lang/rust/issues/91639) of warning-by-default for paths participating in elision much simpler. --- This new lint attempts to accomplish the goal of enforcing consistent syntax. In the process, it supersedes and replaces the existing `elided-named-lifetimes` lint, which means it starts out life as warn-by-default.
2025-06-05Support middle::ty assoc const eq predicates againLeón Orell Valerian Liehr-118/+92
2025-06-05Rename `should_show_cast` to `should_fully_qualify`León Orell Valerian Liehr-15/+16
2025-06-05Auto merge of #142081 - matthiaskrgr:rollup-secpezz, r=matthiaskrgrbors-241/+256
Rollup of 7 pull requests Successful merges: - rust-lang/rust#141709 (jsondocck: Refactor directive handling) - rust-lang/rust#141974 (`tests/ui`: A New Order [4/N]) - rust-lang/rust#141989 (rustdoc-json-type: Depend on `serde` and `serde_derive` seperately) - rust-lang/rust#142015 (Report the actual item that evaluation failed for) - rust-lang/rust#142026 (bootstrap: Fix file permissions when dereferencing symlinks) - rust-lang/rust#142032 (Fix parsing of frontmatters with inner hyphens) - rust-lang/rust#142036 (Update the `compiler-builtins` subtree) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-05Merge pull request #19933 from Veykril/push-uyxorpyvnzslLukas Wirth-10/+134
Better parser recovery for macro calls in type bound position
2025-06-05change tests to use fixed constants to let them pass with miriLorrensP-2158466-1/+3
2025-06-05Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of NoneOli Scherer-3/+3
2025-06-05Better parser recovery for macro calls in type bound positionLukas Wirth-10/+134
2025-06-05Rollup merge of #142026 - smpdt:master, r=KobzolMatthias Krüger-1/+2
bootstrap: Fix file permissions when dereferencing symlinks ## Problem When copying files in the bootstrap process with `dereference_symlinks = true`, we're incorrectly using the symlink's metadata to set permissions on the copied regular file, which results in the following error: ``` Warning: Failed to set file times for "/build/nix-build-rustc-1.86.0.drv-0/rustc-1.86.0-src/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-strip" (permissions: Permissions(FilePermissions { mode: 0o100000 (----------) })) error: Permission denied (os error 13) ``` Verbose Logs confirming the error: ``` TRACE: Found llvm-strip copy operation Source: /n/nix/tech/store/n34yzv2n50p6lbjmx089vjym121wbl4j-llvm-19.1.7/bin/llvm-strip Destination: /build/nix-build-rustc-1.86.0.drv-0/rustc-1.86.0-src/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-strip Source is_symlink (via symlink_metadata): true Source symlink_metadata permissions: 120000 Source symlink_metadata file_type: FileType { is_file: false, is_dir: false, is_symlink: true, .. } Source is symlink pointing to: llvm-objcopy Source raw mode: 120000 Source filetype: 120000 Setting permissions: Permissions(FilePermissions { mode: 0o120000 (l---------) }) Permission mode to set: 120000 Raw permission bits: 120000 File type bits being set: 120000 Permission bits being set: 0 WARNING: Attempting to set symlink file type (120000) on regular file! WARNING: Setting zero permission bits will make file inaccessible! Destination permissions after set_permissions: 100000 ``` ## Solution After canonicalizing a symlink path, fetch the metadata of the target file instead of continuing to use the symlink's metadata. This ensures: - Correct file type detection - Proper permission bits for the target file - Maintains existing behavior for non-symlink cases ## Testing Verified fix resolves permission errors: ``` rustc> llvm-strip: Original metadata mode: 120000, is_symlink: true rustc> llvm-strip: Target metadata mode after fix: 100555 rustc> llvm-strip: Final permissions mode: 100555 ```
2025-06-05Rollup merge of #141989 - aDotInTheVoid:sin-sooner, r=GuillaumeGomezMatthias Krüger-2/+3
rustdoc-json-type: Depend on `serde` and `serde_derive` seperately Before this commit, serde_derive is built before serde. But serde does not depend on serde_derive, so that is not needed. Instead, build serde and serde_derive in parallel. This speeds up compilation for users depending on rustdoc-json-types out of tree. Imports: https://github.com/rust-lang/rustdoc-types/pull/49 CC ``@Enselic`` r? ``@GuillaumeGomez``