about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-15Remove duplicated tracing span in bootstrapJakub Beránek-3/+0
2025-08-15Do not strip binaries in bootstrap everytime if they are unchangedJakub Beránek-1/+12
2025-08-15add static glibc to the nix dev shellWaffle Lapkin-0/+1
this fixes `tests/ui/process/nofile-limit.rs` which fails to link on nixos for me without this change
2025-08-15Rollup merge of #145448 - jieyouxu:rustfmt-labels, r=fmeaseJakub Beránek-0/+10
Autolabel `src/tools/{rustfmt,rust-analyzer}` changes with `T-{rustfmt,rust-analyzer}` Make e.g. rust-lang/rust#144323 more obvious who should be reviewing it and easier to filter.
2025-08-15Rollup merge of #145431 - AMS21:fix_141531, r=jieyouxuJakub Beránek-3/+15
Enhance UI test output handling for runtime errors When a UI test runs a compiled binary and an error/forbid pattern check fails, the failure message previously only showed compiler output, hiding the executed programs stdout/stderr. This makes it harder to see near-miss or unexpected runtime lines. Fixed rust-lang/rust#141531 Supersedes rust-lang/rust#141977
2025-08-15Rollup merge of #145430 - Urgau:drop_forget_useless-145427, r=lqdJakub Beránek-2/+22
Fix wrong spans with external macros in the `dropping_copy_types` lint This PR fixes some wrong spans manipulations when external macros are involved. Specifically we didn't make sure the spans had the same context, which kind-of make our spans manipulations go wrong and produce weird spans. We fix that by making sure they have the same context. Fixes https://github.com/rust-lang/rust/issues/145427
2025-08-15Rollup merge of #145426 - AMS21:fix_typos_bootstrap_example, r=lqdJakub Beránek-2/+2
Fix typos in bootstrap.example.toml Founds these small typos while looking around. `equivelent` -> `equivalent` `recommeded` -> `recommended` cheers :)
2025-08-15Rollup merge of #145413 - joshtriplett:bootstrap-reduce-deps, r=clubby789Jakub Beránek-52/+24
bootstrap: Reduce dependencies Eliminate the `fd-lock` dependency by using the new native locking in std. Eliminate the `xattr` dependency by turning off a feature flag in `tar`, since the tarballs that we extract with bootstrap don't need it.
2025-08-15Rollup merge of #145412 - tgross35:win-tid, r=ChrisDentonJakub Beránek-3/+3
Windows: Replace `GetThreadId`+`GetCurrentThread` with `GetCurrentThreadId` Reference: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getcurrentthreadid
2025-08-15Rollup merge of #145408 - Kobzol:deduplicate-search-paths, r=petrochenkovJakub Beránek-12/+29
Deduplicate -L search paths For each -L passed to the compiler, we eagerly scan the whole directory. If it has a lot of files, that results in a lot of allocations. So it's needless to do this if some -L paths are actually duplicated (which can happen e.g. in the situation in the linked issue). This PR both deduplicates the args, and also teaches rustdoc not to pass duplicated args to merged doctests. Fixes: https://github.com/rust-lang/rust/issues/145375
2025-08-15Rollup merge of #145340 - Kobzol:bootstrap-codegen-backend-check-split, ↵Jakub Beránek-170/+91
r=jieyouxu Split codegen backend check step into two and don't run it with `x check compiler` This reduces the amount of work that is done during `x check compiler`. We still check both backends during `x check` by defaut, even if they are not in `rust.codegen-backends`, as just checking them shouldn't require expensive preparations, like building GCC. r? `@jieyouxu`
2025-08-15Rollup merge of #145311 - marcoieni:clean-disk-in-background-windows, r=KobzolJakub Beránek-1/+184
ci: clean windows disk space in background
2025-08-15Rollup merge of #145310 - Kobzol:compiler-for-revamp, r=jieyouxuJakub Beránek-93/+86
Reduce usage of `compiler_for` in bootstrap While working on refactoring/fixing `dist` steps, I realized that `build.full-bootstrap` does much more than it should, and that it its documentation is wrong. It seems that the main purpose of this option should be to enable/disable stdlib/compiler uplifting (https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Purpose.20of.20.60build.2Efull-bootstrap.60/with/533985624), but currently it also affects staging, or more precisely which compiler will be used to build selected steps, because this option is used in the cursed `compiler_for` function. I would like to change the option it so that it *only* affects uplifting, and doesn't affect stage selection, which I (partially) did in this PR. I removed the usage of `compiler_for` from the `Std` and `Rustc` steps, and explicitly implemented uplifting, without going through `compiler_for`. The only remaining usages of `compiler_for` are in dist steps (which I'm currently refactoring, will send a PR later) and test steps (which I will take a look at after dist). After that we can finally remove the function. I tried to document the case when uplifting was happening during cross-compilation, which was very implicit before. I also did a slight change in the uplifting logic for rustc when cross-compiling. Before, we would attempt to uplift a stage1 rustc, but that is not really a thing when cross-compiling. r? `@jieyouxu`
2025-08-15Rollup merge of #144210 - Gelbpunkt:thread-stack-size-musl, r=jhprattJakub Beránek-1/+12
std: thread: Return error if setting thread stack size fails Currently, when setting the thread stack size fails, it would be rounded up to the nearest multiple of the page size and the code asserts that the next call to `pthread_attr_setstacksize` succeeds. This may be true for glibc, but it isn't true for musl, which not only enforces a minimum stack size, but also a maximum stack size of `usize::MAX / 4 - PTHREAD_STACK_MIN` [1], triggering the assert rather than erroring gracefully. There isn't any way to handle this properly other than bailing out and letting the user know it didn't succeed. [1]: https://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_attr_setstacksize.c#n5
2025-08-15Autolabel `src/tools/{rustfmt,rust-analyzer}` changes with ↵Jieyou Xu-0/+10
`T-{rustfmt,rust-analyzer}`
2025-08-15`{borrow,ptr}_as_ptr`: don't lint inside proc-macros (#15473)Jason Newcomb-54/+75
this could arguably be 2 separate PRs, but both of these were brought up in the same issue, so.. fixes https://github.com/rust-lang/rust-clippy/issues/15398 - [x] I'm a bit doubtful about the last commit -- see the message for my reasoning and do let me know whether it's right. changelog: [`borrow_as_ptr`]: don't lint inside proc-macros changelog: [`ptr_as_ptr`]: don't lint inside proc-macros
2025-08-15fix(tests/rmake/wasm-unexpected-features): change features from `WASM1` to `MVP`StackOverflowExcept1on-1/+1
2025-08-15Use aarch64-apple-darwin as the fallback doc source for `-apple-`Jake Goulding-1/+1
We are moving away from `x86_64-apple-darwin`, so soon these docs won't be available.
2025-08-15Auto merge of #144991 - lcnr:ignore-usages-from-ignored-candidates, r=BoxyUwUbors-149/+429
ignore head usages from ignored candidates Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/210. The test now takes 0.8s to compile, which seems good enough to me. We are actually still walking the entire graph here, we're just avoiding unnecessary reruns. The basic idea is that if we've only accessed a cycle head inside of a candidate which didn't impact the final result of our goal, we don't need to rerun that cycle head even if is the used provisional result differs from the final result. We also use this information when rebasing goals over their cycle heads. If a goal doesn't actually depend on the result of that cycle head, rebasing always succeeds. However, we still need to make sure we track the fact that we relied on the cycle head at all to avoid query instability. It is implemented by tracking the number of `HeadUsages` for every head while evaluating goals. We then also track the head usages while evaluating a single candidate, which the search graph returns as `CandidateHeadUsages`. If there is now an always applicable candidate candidate we know that all other candidates with that source did not matter. We then call `fn ignore_candidate_head_usages` to remove the usages while evaluating this single candidate from the total. If the final `HeadUsages` end up empty, we know that the result of this cycle head did not matter when evaluating its nested goals.
2025-08-15`ptr_as_ptr`: don't allow in proc-macrosAda Alakbarova-42/+40
notice that this stops `inline!` from working as well
2025-08-15Sort mono items by symbol nameJakub Beránek-43/+60
2025-08-15Enhance UI test output handling for runtime errorsAMS21-3/+15
When a UI test runs a compiled binary and an error/forbid pattern check fails, the failure message previously only showed compiler output, hiding the executed programs stdout/stderr. This makes it harder to see near-miss or unexpected runtime lines.
2025-08-15Simplify the `args_cstr_buff` assertionZalathar-5/+4
2025-08-15Avoid an unnecessary intermediate `&mut` referenceZalathar-1/+1
The `NonNull::as_mut` method returns a mut *reference*, rather than the mut *pointer* that is intended here.
2025-08-15Avoid an explicit cast from `*const c_uchar` to `*const c_char`Zalathar-3/+3
As noted in the `ffi` module docs, passing pointer/length byte strings from Rust to C++ is easier if we declare them as `*const c_uchar` on the Rust side, but `const char *` (possibly signed) on the C++ side. This is allowed because both pointer types are ABI-compatible, regardless of char signedness.
2025-08-15Declare module `rustc_codegen_llvm::back` in the normal wayZalathar-8/+6
Declaring these submodules directly in `lib.rs` was needlessly confusing.
2025-08-15Implement `#[derive(From)]`Jakub Beránek-6/+530
2025-08-15Add feature gate testJakub Beránek-0/+19
2025-08-15Create unstable `From` builtin macro and register itJakub Beránek-0/+33
2025-08-15Add `derive_from` unstable featureJakub Beránek-0/+3
2025-08-15Remove unused feature gatebjorn3-1/+0
2025-08-15Merge link_name and export_namebjorn3-44/+33
2025-08-15Fix wrong spans with external macros in the `dropping_copy_types` lintUrgau-2/+22
2025-08-15Use `LLVMGetTypeKind`Zalathar-61/+11
2025-08-15Combining no_mangle and rustc_std_internal_symbol is not allowedbjorn3-11/+6
2025-08-15All weak lang items have an explicit link name and vice versabjorn3-9/+6
2025-08-15Port `#[custom_mir(..)]` to the new attribute systemSasha Pourcelot-91/+318
2025-08-15Auto merge of #145423 - Zalathar:rollup-9jtefpl, r=Zalatharbors-1840/+2279
Rollup of 21 pull requests Successful merges: - rust-lang/rust#118087 (Add Ref/RefMut try_map method) - rust-lang/rust#122661 (Change the desugaring of `assert!` for better error output) - rust-lang/rust#142640 (Implement autodiff using intrinsics) - rust-lang/rust#143075 (compiler: Allow `extern "interrupt" fn() -> !`) - rust-lang/rust#144865 (Fix tail calls to `#[track_caller]` functions) - rust-lang/rust#144944 (E0793: Clarify that it applies to unions as well) - rust-lang/rust#144947 (Fix description of unsigned `checked_exact_div`) - rust-lang/rust#145004 (Couple of minor cleanups) - rust-lang/rust#145005 (strip prefix of temporary file names when it exceeds filesystem name length limit) - rust-lang/rust#145012 (Tail call diagnostics to include lifetime info) - rust-lang/rust#145065 (resolve: Introduce `RibKind::Block`) - rust-lang/rust#145120 (llvm: Accept new LLVM lifetime format) - rust-lang/rust#145189 (Weekly `cargo update`) - rust-lang/rust#145235 (Minor `[const]` tweaks) - rust-lang/rust#145275 (fix(compiler/rustc_codegen_llvm): apply `target-cpu` attribute) - rust-lang/rust#145322 (Resolve the prelude import in `build_reduced_graph`) - rust-lang/rust#145331 (Make std use the edition 2024 prelude) - rust-lang/rust#145369 (Do not ICE on private type in field of unresolved struct) - rust-lang/rust#145378 (Add `FnContext` in parser for diagnostic) - rust-lang/rust#145389 ([rustdoc] Revert "rustdoc search: prefer stable items in search results") - rust-lang/rust#145392 (coverage: Remove intermediate data structures from mapping creation) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-15Fix typos in bootstrap.example.tomlAMS21-2/+2
equivelent -> equivalent recommeded -> recommended
2025-08-15fix: Reject async assoc fns of const traits/impls in ast_passesShoyu Vanilla-10/+69
2025-08-15Merge pull request #20462 from jackh726/nts-part3Lukas Wirth-0/+39
Add test for webrender-2022 dyn issue
2025-08-15Clarify that `build.full-bootstrap` is only used to affect uplifting, not ↵Jakub Beránek-3/+3
stage selection
2025-08-15Remove usage of `compiler_for` from the `compile::Rustc` stepJakub Beránek-51/+43
2025-08-15Remove usage of `compiler_for` from the `compile::Std` stepJakub Beránek-28/+27
2025-08-15Rename `compiler` to `build_compiler` in the `compile::Std` stepJakub Beránek-11/+13
2025-08-15Split codegen backend check step into two and don't run it with `x check ↵Jakub Beránek-170/+91
compiler`
2025-08-15Add more testsywxt-0/+669
2025-08-15Rollup merge of #145392 - Zalathar:create-mappings, r=petrochenkovStuart Cook-77/+31
coverage: Remove intermediate data structures from mapping creation The data structures in `coverage::mappings` were historically very useful for isolating the details of mapping-extraction from the details of how coverage mappings are stored in MIR. But because of various changes that have taken place over time, they now provide little value, and cause difficulty for the coordinated changes that will be needed for introducing expansion mapping support. In the future, the pendulum might eventually swing back towards these being useful again, but we can always reintroduce suitable intermediate data structures if and when that happens. For now, the simplicity of not having this intermediate layer is a higher priority. There should be no changes to compiler output.
2025-08-15Rollup merge of #145389 - GuillaumeGomez:unstable-search, r=fmeaseStuart Cook-68/+5
[rustdoc] Revert "rustdoc search: prefer stable items in search results" Reverts https://github.com/rust-lang/rust/pull/141658 and reverts https://github.com/rust-lang/rust/pull/145349. Reopens https://github.com/rust-lang/rust/issues/138067. r? ```@fmease```
2025-08-15Rollup merge of #145378 - xizheyin:144968, r=davidtwcoStuart Cook-74/+176
Add `FnContext` in parser for diagnostic Fixes rust-lang/rust#144968 Inspired by https://github.com/rust-lang/rust/issues/144968#issuecomment-3156094581, I implemented `FnContext` to indicate whether a function should have a self parameter, for example, whether the function is a trait method, whether it is in an impl block. And I removed the outdated note. I made two commits to show the difference. cc ``@estebank`` ``@djc`` r? compiler