about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-06-26Rollup merge of #143001 - Shourya742:2025-06-25-rename-run-always, r=KobzolMichael Goulet-24/+27
Rename run always This PR renames run_always to run_to_dry_run for better clarity, making the field's purpose more explicit and avoiding confusion with command caching behavior. r? ``````@Kobzol``````
2025-06-26Rollup merge of #142986 - JonathanBrouwer:export_name_parser, r=jdonszelmannMichael Goulet-1/+4
Port `#[export_name]` to the new attribute parsing infrastructure This PR contains two changes, in separate commits for reviewability: - Ports `export_name` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 - Moves the check for mixing export_name/no_mangle to check_attr.rs and improve the error message, which previously had a mix of 2021/2024 edition syntax r? ``@jdonszelmann``
2025-06-26Fix some fixmes that were waiting for let chainsYotam Ofek-3/+3
2025-06-27Fix completion in when typing `integer.|`Chayim Refael Friedman-1/+50
It should show integer, not floating point methods.
2025-06-26Merge pull request #20100 from ShoyuVanilla/ignore-sized-hierarchyChayim Refael Friedman-65/+142
Backport new sized-hierarchy trait bounds in old ways
2025-06-27generate new for tuple fieldHayashi Mikihiro-22/+337
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-06-26rustdoc: show attributes on enum variantsbinarycat-0/+1
mostly for #[non_exhaustive]
2025-06-26Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-2/+8
2025-06-26rustdoc js: several typechecking improvmentsbinarycat-77/+43
non-exhaustive list of changes: * rustdoc.Results has a max_dist field * improve typechecking around pathDist and addIntoResults * give handleNameSearch a type signature * typecheck sortQ * currentCrate is string and not optional * searchState is referenced as a global, not through window
2025-06-26Add `arguments sharing and isolation` section in `diagnostic-struct` of rdgxizheyin-8/+39
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-06-26Backport new sized-hierarchy trait bounds in old waysShoyu Vanilla-24/+78
2025-06-26Rollup merge of #141648 - GuillaumeGomez:redundant_explicit_links-expansion, ↵Matthias Krüger-28/+67
r=lolbinarycat [rustdoc] Do not emit redundant_explicit_links lint if the doc comment comes from expansion Fixes https://github.com/rust-lang/rust/issues/141553. The problem was that we change the context for the attributes in some cases to get better error output, preventing us to detect if the attribute comes from expansion. Most of the changes are about keeping track of the "does this span comes from expansion" information. r? ```@Manishearth```
2025-06-26Rollup merge of #141311 - folkertdev:tidy-natural-sort, r=jieyouxuMatthias Krüger-7/+209
make `tidy-alphabetical` use a natural sort The idea here is that these lines should be correctly sorted, even though a naive string comparison would say they are not: ``` foo2 foo10 ``` This is the ["natural sort order"](https://en.wikipedia.org/wiki/Natural_sort_order). There is more discussion in [#t-compiler/help > tidy natural sort](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/tidy.20natural.20sort/with/519111079) Unfortunately, no standard sorting tools are smart enough to to this automatically (casting some doubt on whether we should make this change). Here are some sort outputs: ``` > cat foo.txt | sort foo foo1 foo10 foo2 mp mp1e2 np", np1e2", > cat foo.txt | sort -n foo foo1 foo10 foo2 mp mp1e2 np", np1e2", > cat foo.txt | sort -V foo foo1 foo2 foo10 mp mp1e2 np1e2", np", ``` Disappointingly, "numeric" sort does not actually have the behavior we want. It only sorts by numeric value if the line starts with a number. The "version" sort looks promising, but does something very unintuitive if you look at the final 4 values. None of the other options seem to have the desired behavior in all cases: ``` -b, --ignore-leading-blanks ignore leading blanks -d, --dictionary-order consider only blanks and alphanumeric characters -f, --ignore-case fold lower case to upper case characters -g, --general-numeric-sort compare according to general numerical value -i, --ignore-nonprinting consider only printable characters -M, --month-sort compare (unknown) < 'JAN' < ... < 'DEC' -h, --human-numeric-sort compare human readable numbers (e.g., 2K 1G) -n, --numeric-sort compare according to string numerical value -R, --random-sort shuffle, but group identical keys. See shuf(1) --random-source=FILE get random bytes from FILE -r, --reverse reverse the result of comparisons --sort=WORD sort according to WORD: general-numeric -g, human-numeric -h, month -M, numeric -n, random -R, version -V -V, --version-sort natural sort of (version) numbers within text ``` r? ```@Noratrieb``` (it sounded like you know this code?)
2025-06-26Rename `tilde const` test files to `conditionally const`Oli Scherer-1/+0
2025-06-26Change const trait bound syntax from ~const to [const]Oli Scherer-25/+25
2025-06-26Merge pull request #4408 from Patrick-6/rework-thread-joinRalf Jung-104/+111
Only write join return value once join succeeds
2025-06-26Delay writing of return value of a join until after the join is successful.Patrick-6-104/+111
2025-06-26Merge pull request #20106 from Veykril/push-pytuxksnntuxLukas Wirth-129/+206
Salsa idiomize `VariantFields` query
2025-06-26Bring back the firewall queryLukas Wirth-15/+22
2025-06-26Merge pull request #20103 from ChayimFriedman2/path-transform-prettifyLukas Wirth-4/+58
fix: Prettify AST in `PathTransform` if it's coming from a macro
2025-06-26Salsa idiomize `VariantFields` queryLukas Wirth-131/+201
2025-06-26Merge pull request #20105 from Veykril/push-qtmwnuqvsruwLukas Wirth-9/+19
Parse new const trait syntax
2025-06-26Auto merge of #142581 - Kobzol:bootstrap-std-method, r=jieyouxubors-680/+943
Enforce in bootstrap that build must have stage at least 1 This PR is a step towards https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Proposal.20to.20cleanup.20stages.20and.20steps.20after.20the.20redesign/with/523586917. It's very hard or me to make self-contained changes to bootstrap at this moment, so this PR kind of does several things: 1) (first two commits) Try to reduce the usage of `Std::new` in bootstrap, and replace it with a `Builder::std` method (similar to `Builder::compiler`). This is mostly to remove executions of the `Std` step for stage 0, which doesn't make a lot of sense; I'd like to ideally have the invariant that when a step is invoked, it actually builds or does something. Eventually, I'd like for everything to go through `Builder::std`. (Note: I'm not totally married to this idea, if you don't like it, we can remove it from this PR. I mostly did it right now to remove stage 0 std steps from snapshot tests, which shouldn't be there, but we can also filter them out in a different way) 2) Make sure that when you pass `x build compiler`, only the `Assemble` root level step will be invoked, and not the `Rustc` step. Before, both were invoked, which actually ran `Rustc` twice, once with all `crates` filled, and once with no crates (but both actually represent the same situation). Since the `Rustc::make_run` step actually requests a compile that is one stage below it, this actually made `build compiler --stage 0` work, which we don't want to have anymore. 3) Enforce a bootstrap-global invariant that all `build` commands are always on stage `>=1`. If you try to `build` anything on stage 0, it will print a warning and exit bootstrap. This follows the intuition from the new staging rules after the stage redesign; artifacts that are "stage 0" come outside of bootstrap, and we can't really build something for which we don't have source (although we can still test it, but that's for another PR). Now the logic for build should be quite simple. For pretty much everything except for `Std`, you first use the stage0 compiler to build stage 1. Then you can build a stage 2 <something> using the previously built stage 1 (and then you can continue to stage 3 etc.). And that's it. The default build stage for everything is 1 (modulo download-ci-rustc, but that's a separate can of worms). The snapshot test infra isn't super nice at the moment, as one of next steps I want to create some simple Builder pattern that will allow us to configure the bootstrap invocations in a more "forward-compatible" way (e.g. now it's not possible to modify the config passed to `configure_with_args`). There are some things not yet fully resolved for build stage 0: 1) Cargo is still a `ModeRustc` tool, even though it doesn't really have to be, it is buildable with the stage0 compiler 2) bootstrap tools (`opt-dist`, `build-manifest` etc.) are still called stage0 tools, and in the bootstrap output it says something like "stage 0 rustc builds stage 0 opt-dist". Which is a bit weird, but functionally there's no difference, it's just a slightly inconsistent output. We still haven't decided if we should make these tools ignore staging altogether (which is IMO the right choice) or if we want to allow building stage 1/2/3/... bootstrap tools. r? `@jieyouxu` try-job: x86_64-rust-for-linux
2025-06-26Parse new const trait syntaxLukas Wirth-9/+19
2025-06-26Merge pull request #20104 from Veykril/push-nqnmmlvksytyLukas Wirth-55/+59
Cleanup `provideCodeActions` vscode hook
2025-06-26Cleanup `provideCodeActions` vscode hookLukas Wirth-55/+59
2025-06-26make size_and_align_of_mplace work on all projectableRalf Jung-4/+4
2025-06-26Prettify AST in `PathTransform` if it's coming from a macroChayim Refael Friedman-4/+58
2025-06-26Port `#[export_name]` to the new attribute parsing infrastructureJonathan Brouwer-1/+4
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-26Auto merge of #141899 - Kobzol:stdarch-josh, r=Amanieubors-7/+1
Turn `stdarch` into a Josh subtree In a similar vein as https://github.com/rust-lang/rust/pull/141229, this PR makes the `stdarch` repository a Josh subtree (it was previously a submodule). The initial commit of `stdarch` upon this is based is `5a7342fc16b208b1b16624e886937ed8509a6506`, which is the previous commit SHA of the `stdarch` submodule. The sync was performed according to https://hackmd.io/7pOuxnkdQDaL1Y1FQr65xg. This was decided in https://github.com/rust-lang/stdarch/issues/1655. Test pull PR on my fork: https://github.com/Kobzol/stdarch/pull/1 Test push PR on my fork: https://github.com/Kobzol/rust/pull/59 I plan to use the same Rust (miri-inspired) tooling that we use for `rustc-dev-guide` to enable pulls/pushes on stdarch. Note that this repository currently doesn't have any stdarch-specific tests, so before that, the subtree should only be modified through this repository only when dealing with changes that contain "cyclical dependencies" between stdarch and rustc. The long term vision is to integrate stdarch into rust-lang/rust completely. CC `@Amanieu` try-job: aarch64-apple try-job: aarch64-gnu try-job: `x86_64-msvc-*` try-job: x86_64-gnu try-job: x86_64-gnu-aux
2025-06-26refactor: enhance highlighting for control flow kws in macrosroifewu-33/+45
2025-06-26refactor: simplify functions related to branch_exit_points in highlight_relatedroifewu-72/+74
2025-06-26refactor: rename `branches` to `branch_exit_points` in highlight_relatedroifewu-11/+11
2025-06-26refactor: improve macro handling in navigation for control-flow kwsroifewu-13/+47
2025-06-26feat: highlighting of related return values while the cursor is on any ↵roifewu-9/+775
`match`, `if`, or match arm arrow (`=>`)
2025-06-26Merge pull request #20101 from ShoyuVanilla/comp-time-deps-soonerLaurențiu Nicola-1/+1
minor: Decrease minimal toolchain version for `comp-time-deps` to `1.89.0`
2025-06-26Merge from rustcThe rustc-dev-guide Cronjob Bot-2221/+4274
2025-06-26Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-06-26Add windows-gnullvm hosts to the manifestMateusz Mikuła-1/+3
2025-06-25make `tidy-alphabetical` use a natural sortFolkert de Vries-7/+209
2025-06-25Rollup merge of #142992 - workingjubilee:dont-validate-naughty-abis, r=jieyouxuJana Dönszelmann-0/+5
Convert some ABI tests to use `extern "rust-invalid"`
2025-06-25Rollup merge of #142809 - KMJ-007:ad-type-analysis-flag, r=ZuseZ4Jana Dönszelmann-0/+2
Add PrintTAFn flag for targeted type analysis printing ## Summary This PR adds a new `PrintTAFn` flag to the `-Z autodiff` option that allows printing type analysis information for a specific function, rather than all functions. ## Changes ### New Flag - Added `PrintTAFn=<function_name>` option to `-Z autodiff` - Usage: `-Z autodiff=Enable,PrintTAFn=my_function_name` ### Implementation Details - **Rust side**: Added `PrintTAFn(String)` variant to `AutoDiff` enum - **Parser**: Updated `parse_autodiff` to handle `PrintTAFn=<function_name>` syntax with proper error handling - **FFI**: Added `set_print_type_fun` function to interface with Enzyme's `FunctionToAnalyze` command line option - **Documentation**: Updated help text and documentation for the new flag ### Files Modified - `compiler/rustc_session/src/config.rs`: Added `PrintTAFn(String)` variant - `compiler/rustc_session/src/options.rs`: Updated parser and help text (now shows `PrintTAFn` in the list) - `compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs`: Added FFI function and static variable - `compiler/rustc_codegen_llvm/src/back/lto.rs`: Added handling for new flag - `src/doc/rustc-dev-guide/src/autodiff/flags.md`: Updated documentation - `src/doc/unstable-book/src/compiler-flags/autodiff.md`: Updated documentation ## Testing The flag can be tested with: ```bash rustc +enzyme -Z autodiff=Enable,PrintTAFn=square test.rs ``` This will print type analysis information only for the function named "square" instead of all functions. ## Error Handling The parser includes proper error handling: - Missing argument: `PrintTAFn` without `=<function_name>` will show an error - Unknown options: Invalid autodiff options will be reported r? ```@ZuseZ4```
2025-06-26minor: Decrease minimal toolchain version for `comp-time-deps` by `0.1`Shoyu Vanilla-1/+1
2025-06-25Unify formatting of progress messagesVincent Esche-7/+6
2025-06-25Remove `mut`Jakub Beránek-2/+2
2025-06-25Do not build GCC in fast try buildsJakub Beránek-1/+4
2025-06-25Skip more dist componentsJakub Beránek-0/+5
2025-06-25Skip unnecessary components in x64 try buildsJakub Beránek-4/+22
2025-06-25Update `browser-ui-test` version to `0.20.7`Guillaume Gomez-1/+1
2025-06-25Merge pull request #20096 from lnicola/silence-rustfmt-failedLukas Wirth-11/+8
internal: Don't show notifications on failed rustfmt calls