about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-06-20Update src/shims/trace/parent.rsNia-4/+5
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
2025-06-20error reworkNia Espera-33/+17
2025-06-20Make fail-fast unstableMartin Pool-0/+2
2025-06-20nonnullsNia Espera-22/+18
2025-06-20libtest: expose --fail-fastMartin Pool-0/+10
2025-06-20cfg ifNia Espera-4/+1
2025-06-20fix dumb mistakeNia Espera-1/+6
2025-06-20supervisor bits of ffi ptracingNia Espera-81/+606
2025-06-20Rollup merge of #142767 - nnethercote:symbol-cleanups, r=petrochenkovJakub Beránek-2/+2
Some symbol and PathRoot cleanups I'm looking into unifying how we join and print paths. Here are some preliminary cleanups. r? ``@petrochenkov``
2025-06-20Rollup merge of #142764 - ChaiTRex:ilog_10_to_ilog10, r=workingjubileeJakub Beránek-1/+1
Convert `ilog(10)` to `ilog10()` Except in tests, convert `integer.ilog(10)` to `integer.ilog10()` for better speed and to provide better examples of code that efficiently counts decimal digits. I couldn't find any instances of `integer.ilog(2)`.
2025-06-20Rollup merge of #142758 - jieyouxu:rustdoc-json-types, r=KobzolJakub Beránek-1/+1
Make sure to rebuild rustdoc if `src/rustdoc-json-types` is changed I think `rustdoc-json-types` was more recently split out, so this download-rustc logic became outdated as it wasn't tracked. This PR adds `src/rustdoc-json-types` to be tracked for difference versus upstream, so that we properly rebuild rustdoc if it has changes versus upstream. Fixes rust-lang/rust#142738. ### Local testing This is not so easy to test locally because it requires download-rustc. To test this, you need to: 1. Disable `download-rustc` inhibition from bootstrap changes versus upstream, by including `:!src/bootstrap` in https://github.com/rust-lang/rust/blob/255aa220821c05c3eac7605fce4ea1c9ab2cbdb4/src/bootstrap/src/core/config/config.rs#L67-L74. 2. Then, use a config like `profile = "tools"` which by default uses `download-rustc = "if-unchanged"`. 3. Run `./x test tests/rustdoc-json` one time, to "prime" initial build caches. 4. Change the `FORMAT_VERSION` in `src/rustdoc-json-types`, i.e. ```diff diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs index 1f93895ae07..72a3720c7b4 100644 --- a/src/rustdoc-json-types/lib.rs +++ b/src/rustdoc-json-types/lib.rs ``@@`` -38,7 +38,7 ``@@`` // are deliberately not in a doc comment, because they need not be in public docs.) // // Latest feature: Pretty printing of inline attributes changed -pub const FORMAT_VERSION: u32 = 48; +pub const FORMAT_VERSION: u32 = 666; ``` 5. Observe that without this patch, `rustdoc-json` tests fail because `FORMAT_VERSION` mismatch. Observe that with this patch, rustdoc gets properly rebuilt and `rustdoc-json` tests pass. cc ``@aDotInTheVoid`` r? Kobzol
2025-06-20Rollup merge of #142743 - tshepang:rdg-push, r=jieyouxuJakub Beránek-96/+252
rustc-dev-guide subtree update r? ``@ghost``
2025-06-20Rollup merge of #142720 - yotamofek:pr/rustdoc/ext-crate-cleanup, ↵Jakub Beránek-71/+53
r=GuillaumeGomez De-dup common code from `ExternalCrate` methods Also, return an `impl Iterator` instead of collecting into a `Vec`. Not sure if that'll have a measurable perf impact, but I think this PR still cleans up the two methods it touches quite nicely. (I'm having trouble finding a name for the common method I extracted, currently called `foobar`, would love suggestions!)
2025-06-20Rollup merge of #142715 - folkertdev:fn-align-corrections, r=jdonszelmannJakub Beránek-1/+1
correct template for `#[align]` attribute Tracking issue: https://github.com/rust-lang/rust/issues/82232 related: https://github.com/rust-lang/rust/pull/142507 I didn't fully understand what `template!` did, clearly. An empty `#[align]` attribute was still rejected later, but without this change it does get suggested in certain cases. I've also updated some outdated references to `#[repr(align)]` on functions. r? ``@jdonszelmann``
2025-06-20Rollup merge of #142629 - Kobzol:bootstrap-tests-builder, r=jieyouxuJakub Beránek-19/+114
Add config builder for bootstrap tests I started writing a bunch of snapshot tests for build/check steps, and quickly realized that the current interface for defining them won't be enough, so I created a simple builder, which can scale to pretty much any kind of configuration in the future.
2025-06-20rust-analyzer: Rename LayoutS to LayoutData in commentsZachary S-1/+1
2025-06-20Rollup merge of #142755 - aDotInTheVoid:rdj-shattrs, r=GuillaumeGomezTrevor Gross-12/+1
rustdoc: Remove `FormatRenderer::cache` We only called it it one place, which isn't generic and can be replaced with a field access.
2025-06-20Rollup merge of #142650 - camsteffen:refactor-translator, r=petrochenkovTrevor Gross-71/+36
Refactor Translator My main motivation was to simplify the usage of `SilentEmitter` for users like rustfmt. A few refactoring opportunities arose along the way. * Replace `Translate` trait with `Translator` struct * Replace `Emitter: Translate` with `Emitter::translator` * Split `SilentEmitter` into `FatalOnlyEmitter` and `SilentEmitter`
2025-06-20Rollup merge of #142497 - GuillaumeGomez:fix-random-search-failure, ↵Trevor Gross-37/+41
r=lolbinarycat Fix random failure when JS code is executed when the whole file was not read yet Very randomly (and rarely), when I arrived on a page with `?search=something` in the URL, I got this error: ![Screenshot From 2025-06-14 11-27-46](https://github.com/user-attachments/assets/4b61b067-4e80-49c1-9a45-cff1509bf86a) Moving the `initSearch` function at the bottom to ensure everything has been loaded fixes the issue. PS: Sorry for the noise. Pushed to the wrong branch and https://github.com/rust-lang/rust/pull/142496 closed. ><
2025-06-20Bump the version number to 1.90.0Josh Stone-1/+1
2025-06-20update configure.py to handle new bootstrap.example.tomlbinarycat-7/+24
2025-06-20clippy: replace path uses by diagnostic itemsSamuel Tardieu-24/+16
2025-06-20Improve error message for rustdoc_json_types tidy checkGuillaume Gomez-11/+25
Only emit git errors if we are in CI environment
2025-06-20fix(linkcheck): Build using the lockfileEd Page-0/+1
This is to unblock cargo from servo/html5ever#623
2025-06-20Pass `src_path` to rustdoc_json tidy checkGuillaume Gomez-11/+13
2025-06-20Generate base commit in rustdoc_json tidy checksGuillaume Gomez-5/+28
2025-06-20expected word diagnostic testJana Dönszelmann-2/+2
2025-06-20Add CI check to ensure that rustdoc JSON `FORMAT_VERSION` is correctly updatedGuillaume Gomez-0/+68
2025-06-20Pass -Cpanic=abort for the panic_abort cratebjorn3-12/+0
The panic_abort crate must be compiled with panic=abort, but cargo doesn't allow setting the panic strategy for a single crate the usual way using panic="abort", but luckily per-package rustflags do allow this. Bootstrap previously handled this in its rustc wrapper, but for example the build systems of cg_clif and cg_gcc don't use the rustc wrapper, so they would either need to add one, patch the standard library or be unable to build a sysroot suitable for both panic=abort and panic=unwind (as is currently the case).
2025-06-20Add better documentation for excluding imports from symbol searchLucas Holten-3/+11
2025-06-20Auto merge of #142770 - tgross35:rollup-w74w39t, r=tgross35bors-7/+5
Rollup of 8 pull requests Successful merges: - rust-lang/rust#138291 (rewrite `optimize` attribute to use new attribute parsing infrastructure) - rust-lang/rust#140920 (Extract some shared code from codegen backend target feature handling) - rust-lang/rust#141990 (Implement send_signal for unix child processes) - rust-lang/rust#142668 (vec_deque/fmt/vec tests: remove static mut) - rust-lang/rust#142687 (Reduce uses of `hir_crate`.) - rust-lang/rust#142699 (Update books) - rust-lang/rust#142714 (add comment to `src/bootstrap/build.rs`) - rust-lang/rust#142753 (Update library dependencies) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-20Merge pull request #20046 from regexident/type-param-parent-getterFlorian Diebold-0/+4
Add `fn parent(self, db) -> GenericDef` to `hir::TypeParam`
2025-06-20Convert `ilog(10)` to `ilog10()`Chai T. Rex-1/+1
2025-06-20Rollup merge of #142714 - fee1-dead-contrib:push-roxtwrlvtzur, r=KobzolTrevor Gross-0/+1
add comment to `src/bootstrap/build.rs` I attempted to remove this build script but it's apparently needed. Add a comment for why.
2025-06-20Rollup merge of #142699 - rustbot:docs-update, r=ehussTrevor Gross-0/+0
Update books ## rust-lang/book 1 commits in 4433c9f0cad8460bee05ede040587f8a1fa3f1de..8a6d44e45b7b564eeb6bae30507e1fbac439d72d 2025-06-18 17:06:36 UTC to 2025-06-18 17:06:36 UTC - Chapter 12 from tech review (rust-lang/book#4410) ## rust-lang/reference 6 commits in d4c66b346f4b72d29e70390a3fa3ea7d4e064db1..50fc1628f36563958399123829c73755fa7a8421 2025-06-19 02:02:39 UTC to 2025-06-17 21:18:46 UTC - Document inferred const args (`feature(generic_arg_infer)`) (rust-lang/reference#1835) - const_eval: we allow references to statics and promoteds (rust-lang/reference#1858) - Fix missing rule on destructors (rust-lang/reference#1861) - Fix inconsistent heading depth (rust-lang/reference#1860) - Fix recursive root-accessible grammar check (rust-lang/reference#1852) - Fix grammar links (rust-lang/reference#1851) ## rust-lang/rust-by-example 1 commits in 9baa9e863116cb9524a177d5a5c475baac18928a..05c7d8bae65f23a1837430c5a19be129d414f5ec 2025-06-18 13:15:17 UTC to 2025-06-18 13:15:17 UTC - Revert "introduce new ````@media```` query to set a higher content width on ultra wide screens" (rust-lang/rust-by-example#1939)
2025-06-20Rollup merge of #142687 - cjgillot:less-hir_crate, r=oli-obkTrevor Gross-2/+0
Reduce uses of `hir_crate`. I tried rebasing my old incremental-HIR branch. This is a by-product, which is required if we want to get rid of `hir_crate` entirely. The second commit is a drive-by cleanup. It can be pulled into its own PR. r? ````@oli-obk````
2025-06-20Rollup merge of #140920 - RalfJung:target-feature-unification, ↵Trevor Gross-3/+2
r=nnethercote,WaffleLapkin Extract some shared code from codegen backend target feature handling There's a bunch of code duplication between the GCC and LLVM backends in target feature handling. This moves that into new shared helper functions in `rustc_codegen_ssa`. The first two commits should be purely refactoring. I am fairly sure the LLVM-side behavior stays the same; if the GCC side deliberately diverges from this then I may have missed that. I did account for one divergence, which I do not know is deliberate or not: GCC does not seem to use the `-Ctarget-feature` flag to populate `cfg(target_feature)`. That seems odd, since the `-Ctarget-feature` flag is used to populate the return value of `global_gcc_features` which controls the target features actually used by GCC. ``@GuillaumeGomez`` ``@antoyo`` is there a reason `target_config` ignores `-Ctarget-feature` but `global_gcc_features` does not? The second commit also cleans up a bunch of unneeded complexity added in https://github.com/rust-lang/rust/pull/135927. The third commit extracts some shared logic out of the functions that populate `cfg(target_feature)` and the backend target feature set, respectively. This one actually has some slight functional changes: - Before, with `-Ctarget-feature=-feat`, if there is some other feature `x` that implies `feat` we would *not* add `-x` to the backend target feature set. Now, we do. This fixes rust-lang/rust#134792. - The logic that removes `x` from `cfg(target_feature)` in this case also changed a bit, avoiding a large number of calls to the (uncached) `sess.target.implied_target_features` (if there were a large number of positive features listed before a negative feature) but instead constructing a full inverse implication map when encountering the first negative feature. Ideally this would be done with queries but the backend target feature logic runs before `tcx` so we can't use that... - Previously, if feature "a" implied "b" and "b" was unstable, then using `-Ctarget-feature=+a` would also emit a warning about `b`. I had to remove this since when accounting for negative implications, this emits a ton of warnings in a bunch of existing tests... I assume this was unintentional anyway. The fourth commit increases consistency of the GCC backend with the LLVM backend. The last commit does some further cleanup: - Get rid of RUSTC_SPECIAL_FEATURES. It was only needed for s390x "backchain", but since LLVM 19 that is always a regular target feature so we don't need this hack any more. The hack also has various unintended side-effects so we don't want to keep it. Fixes https://github.com/rust-lang/rust/issues/142412. - Move RUSTC_SPECIFIC_FEATURES handling into the shared parse_rust_feature_flag helper so all consumers of `-Ctarget-feature` that only care about actual target features (and not "crt-static") have it. Previously, we actually set `cfg(target_feature = "crt-static")` twice: once in the backend target feature logic, and once specifically for that one feature. IIUC, some targets are meant to ignore `-Ctarget-feature=+crt-static`, it seems like before this PR that flag still incorrectly enabled `cfg(target_feature = "crt-static")` (but I didn't test this). - Move fixed_x18 handling together with retpoline handling. - Forbid setting fixed_x18 as a regular target feature, even unstably. It must be set via the `-Z` flag. ``@bjorn3`` I did not touch the cranelift backend here, since AFAIK it doesn't really support target features. But if you ever do, please use the new helpers. :) Cc ``@workingjubilee``
2025-06-20Rollup merge of #138291 - jdonszelmann:optimize-attr, r=oli-obkTrevor Gross-2/+2
rewrite `optimize` attribute to use new attribute parsing infrastructure r? ```@oli-obk``` I'm afraid we'll get quite a few of these PRs in the future. If we get a lot of trivial changes I'll start merging multiple into one PR. They should be easy to review :) Waiting on #138165 first
2025-06-20Auto merge of #142286 - Kobzol:clippy-jemalloc, r=flip1995,blyxyasbors-2/+51
Use jemalloc for Clippy The tool macros are annoying, we should IMO just get rid of them, create separate steps for each tool and (re)use some builders in them to share the build code. r? `@ghost`
2025-06-20Add temporary directory for executing snapshot testsJakub Beránek-16/+45
2025-06-20Merge from rustcThe Miri Cronjob Bot-239/+296
2025-06-20Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-06-20Remove an unnecessary check in rustfmt.Nicholas Nethercote-1/+1
"{{root}}" is an internal-only name, and cannot appear in Rust code being formatted.
2025-06-20Avoid some unnecessary symbol interning.Nicholas Nethercote-1/+1
- `Ident::from_str_and_span` -> `Ident::new` when the string is pre-interned. - `Ident::from_str` -> `Ident::with_dummy_span` when the string is pre-interned. - `_d` and `_e` are unused.
2025-06-20Merge pull request #4362 from nia-e/fix-alloc-perfRalf Jung-36/+72
isolated_alloc: directly use mmap for allocations
2025-06-20Merge pull request #20035 from joshka/jm/test-explorer-colorHKalbasi-0/+1
Add --color=always to test explorer command
2025-06-20Make sure to rebuild rustdoc if `src/rustdoc-json-types` is changedJieyou Xu-1/+1
2025-06-19rustdoc: Remove `FormatRenderer::cache`Alona Enraght-Moony-12/+1
We only called it it one place, which isn't generic and can be replaced with a field access.
2025-06-19Auto merge of #140748 - m-ou-se:super-format-args3, r=jdonszelmannbors-53/+47
Allow storing `format_args!()` in variable Fixes https://github.com/rust-lang/rust/issues/92698 Tracking issue for super let: https://github.com/rust-lang/rust/issues/139076 Tracking issue for format_args: https://github.com/rust-lang/rust/issues/99012 This change allows: ```rust let name = "world"; let f = format_args!("hello {name}!"); // New: Store format_args!() for later! println!("{f}"); ``` This will need an FCP. This implementation makes use of `super let`, which is unstable and might not exist in the future in its current form. However, it is entirely reasonable to assume future Rust will always have _a_ way of expressing temporary lifetimes like this, since the (stable) `pin!()` macro needs this too. (This was also the motivation for merging https://github.com/rust-lang/rust/pull/139114.) (This is a second version of https://github.com/rust-lang/rust/pull/139135)
2025-06-19Extract SilentEmitterCameron Steffen-14/+9