about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-08-17Switch generics_require_sized_self to next solverjackh726-25/+17
2025-08-17Convert more of dyn_compatibility to next-solverjackh726-153/+130
2025-08-17Switch associated_type_shorthand_candidates to lower_nextsolverjackh726-159/+197
2025-08-17Cleanup assoc_type_shorthand_candidatesjackh726-14/+13
2025-08-17Change direct_super_traits to use generic_predicates_for_param_nsjackh726-25/+50
2025-08-17Convert some of mir/eval to next-solver typesjackh726-132/+258
2025-08-17Deduplicate layout_of_adtjackh726-47/+19
2025-08-17impl HirDisplay for next_solver::Tyjackh726-392/+584
2025-08-17Convert more of dyn_compatibility to next-solverjackh726-130/+123
2025-08-17Convert some of dyn_compatibility to next-solver and remove ↵jackh726-53/+79
generic_predicates_without_parent_query
2025-08-17Add `-Zindirect-branch-cs-prefix` optionMiguel Ojeda-0/+19
This is intended to be used for Linux kernel RETPOLINE builds. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2025-08-17fix: Make lang items query properly filter out overwritten/excluded sysrootsShoyu Vanilla-68/+166
2025-08-17fix: python formatting errornilptr-4/+4
2025-08-17feat(lldb debug info): deref pointer types for more accurate rust type ↵nilptr-0/+3
classification
2025-08-17feat(lldb debug info): improve enum value formatting in lldbnilptr-18/+17
2025-08-17Auto merge of #144081 - RalfJung:const-ptr-fragments, r=oli-obkbors-69/+104
const-eval: full support for pointer fragments This fixes https://github.com/rust-lang/const-eval/issues/72 and makes `swap_nonoverlapping` fully work in const-eval by enhancing per-byte provenance tracking with tracking of *which* of the bytes of the pointer this one is. Later, if we see all the same bytes in the exact same order, we can treat it like a whole pointer again without ever risking a leak of the data bytes (that encode the offset into the allocation). This lifts the limitation that was discussed quite a bit in https://github.com/rust-lang/rust/pull/137280. For a concrete piece of code that used to fail and now works properly consider this example doing a byte-for-byte memcpy in const without using intrinsics: ```rust use std::{mem::{self, MaybeUninit}, ptr}; type Byte = MaybeUninit<u8>; const unsafe fn memcpy(dst: *mut Byte, src: *const Byte, n: usize) { let mut i = 0; while i < n { *dst.add(i) = *src.add(i); i += 1; } } const _MEMCPY: () = unsafe { let ptr = &42; let mut ptr2 = ptr::null::<i32>(); // Copy from ptr to ptr2. memcpy(&mut ptr2 as *mut _ as *mut _, &ptr as *const _ as *const _, mem::size_of::<&i32>()); assert!(*ptr2 == 42); }; ``` What makes this code tricky is that pointers are "opaque blobs" in const-eval, we cannot just let people look at the individual bytes since *we don't know what those bytes look like* -- that depends on the absolute address the pointed-to object will be placed at. The code above "breaks apart" a pointer into individual bytes, and then puts them back together in the same order elsewhere. This PR implements the logic to properly track how those individual bytes relate to the original pointer, and to recognize when they are in the right order again. We still reject constants where the final value contains a not-fully-put-together pointer: I have no idea how one could construct an LLVM global where one byte is defined as "the 3rd byte of a pointer to that other global over there" -- and even if LLVM supports this somehow, we can leave implementing that to a future PR. It seems unlikely to me anyone would even want this, but who knows.^^ This also changes the behavior of Miri, by tracking the order of bytes with provenance and only considering a pointer to have valid provenance if all bytes are in the original order again. This is related to https://github.com/rust-lang/unsafe-code-guidelines/issues/558. It means one cannot implement XOR linked lists with strict provenance any more, which is however only of theoretical interest. Practically I am curious if anyone will show up with any code that Miri now complains about - that would be interesting data. Cc `@rust-lang/opsem`
2025-08-16tidy: add better error reporting for if typos can't be runbinarycat-1/+0
2025-08-16tidy: run typos check in src root, not current dirbinarycat-4/+17
2025-08-16tidy now installs typos-cli as-needed via cargobinarycat-28/+76
2025-08-16run spellcheck as a tidy extra check in cibinarycat-2/+2
2025-08-16Auto merge of #145304 - m-ou-se:simplify-panic, r=oli-obkbors-9/+1
Revert "Partially outline code inside the panic! macro". This reverts https://github.com/rust-lang/rust/pull/115670 Without any tests/benchmarks that show some improvement, it's hard to know whether the change had any positive effect. (And if it did, whether that effect is still achieved today.)
2025-08-16Only check std in cross-compilation instead of building itJakub Beránek-57/+153
2025-08-16Avoid copying rustc rmeta artifacts into the build compiler sysrootJakub Beránek-65/+189
This helps to avoid polluting the sysroot of the build compiler.
2025-08-16Optimize `copy_src_dirs`Jakub Beránek-39/+42
2025-08-16Do not call `fs::remove_file` in `cp_link_filtered_recurse`Jakub Beránek-1/+0
The target is removed by `copy_link` too, so no need to duplicate the syscall.
2025-08-16refactor: Hard-code `char::is_control`Karl Meakin-1/+0
According to https://www.unicode.org/policies/stability_policy.html#Property_Value, the set of codepoints in `Cc` will never change. So we can hard-code the patterns to match against instead of using a table.
2025-08-15Rollup merge of #145455 - Kobzol:bootstrap-copy-src-dirs-dry-run, r=jieyouxuJacob Pratt-0/+6
Do not copy files in `copy_src_dirs` in dry run This reduces the time to run the current 9 dist snapshot tests from ~24s to ~2s on my PC. r? `@jieyouxu`
2025-08-15Rollup merge of #145454 - Kobzol:bootstrap-fix-step-debug-repr, r=jieyouxuJacob Pratt-3/+8
Fix tracing debug representation of steps without arguments in bootstrap I was wondering why I see `lainSourceTarbal` in tracing logs... r? `@jieyouxu`
2025-08-15Rollup merge of #145453 - Kobzol:bootstrap-cmd-span, r=jieyouxuJacob Pratt-3/+0
Remove duplicated tracing span in bootstrap `trace_cmd` is now called also in the `stream` method, so including it also here was duplicating command spans. r? `@jieyouxu`
2025-08-15rustdoc-search: search backend with partitioned suffix treeMichael Howell-4343/+8383
2025-08-15Use a more specific error message when talking about the server logsKirill Bulatov-1/+3
2025-08-15stabilize strict provenance atomic ptrKivooeo-1/+0
2025-08-15Extend `QueryStability` to handle `IntoIterator` implementationsSamuel Moelius-1/+1
Fix adjacent code Fix duplicate warning; merge test into `tests/ui-fulldeps/internal-lints` Use `rustc_middle::ty::FnSig::inputs` Address two review comments - https://github.com/rust-lang/rust/pull/139345#discussion_r2109006991 - https://github.com/rust-lang/rust/pull/139345#discussion_r2109058588 Use `Instance::try_resolve` Import `rustc_middle::ty::Ty` as `Ty` rather than `MiddleTy` Simplify predicate handling Add more `#[allow(rustc::potential_query_instability)]` following rebase Remove two `#[allow(rustc::potential_query_instability)]` following rebase Address review comment Update compiler/rustc_lint/src/internal.rs Co-authored-by: lcnr <rust@lcnr.de>
2025-08-15Demote x86_64-apple-darwin to Tier 2 with host toolsJake Goulding-32/+20
Switch to only using aarch64 runners (implying we are now cross-compiling) and stop running tests. In the future, we could enable (some?) tests via Rosetta 2.
2025-08-15Do not copy files in `copy_src_dirs` in dry runJakub Beránek-0/+6
2025-08-15Fix tracing debug representation of steps without arguments in bootstrapJakub Beránek-3/+8
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 #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 #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 #145408 - Kobzol:deduplicate-search-paths, r=petrochenkovJakub Beránek-2/+8
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/+179
ci: clean windows disk space in background
2025-08-15Rollup merge of #145310 - Kobzol:compiler-for-revamp, r=jieyouxuJakub Beránek-90/+83
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-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-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-15Merge link_name and export_namebjorn3-1/+1
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