about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
AgeCommit message (Collapse)AuthorLines
2025-06-30build-fail directive: make explanation more uniformTshepang Mbambo-3/+3
The last part of the paragraph did not fit
2025-06-29Update README.mdkilavvy-1/+1
- Update ui.md - Update type-alias-impl-trait.md - Update README.md
2025-06-29Add broken `./x test library/std` advisoryJieyou Xu-0/+18
2025-06-28Merge pull request #2481 from xizheyin/submit-in-rdg-or-rTshepang Mbambo-0/+4
Explain where rdg changes should be submitted
2025-06-28Add a link to rust-forge to explain where rdg changes should be submittedxizheyin-0/+4
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-06-27Fix typoxizheyin-11/+11
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
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-26Merge from rustcThe rustc-dev-guide Cronjob Bot-0/+11
2025-06-26Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
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/+1
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-25Sprinkle breadcrumbs around to lead people to the rust-invalid ABIJubilee Young-0/+5
2025-06-25added PrintTAFn flag for autodiffKaran Janthe-0/+1
Signed-off-by: Karan Janthe <karanjanthe@gmail.com>
2025-06-23Rollup merge of #141597 - Oneirical:unquestionable-instruction, r=jieyouxuMatthias Krüger-0/+5
Document subdirectories of UI tests with README files Part of rust-lang/rust#133895 and the [2025 Google Summer of Code](https://blog.rust-lang.org/2025/05/08/gsoc-2025-selected-projects/) associated project. When adding a new UI test, one is faced with hundreds of subdirectories in `tests/ui` reflecting various categories. Knowing where to put the new test is not trivial, as many of the categories have slightly misleading names. For example, `moves` does not only refer to the `move` keyword but to functions taking ownership in general, whereas `allocator` does not refer to allocation in general but rather to the very specific `allocator_api` and `global_allocator` features. Many contributors will therefore place their test at the top level of ̀`tests/ui` where it will be mixed with hundreds of unrelated tests. This PR is a tentative move towards more clearly defined tag/categories, with a SUMMARY.md file documenting the true purpose of each subdirectory, placed inside `tests/ui`. r? ``@jieyouxu``
2025-06-22Add a SUMMARY.md outlining immediate subdirectories of the ui test suiteOneirical-0/+5
Co-authored-by: Jieyou Xu <jieyouxu@outlook.com>
2025-06-19Merge from rustcThe rustc-dev-guide Cronjob Bot-3/+5
2025-06-19Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-06-18initial instructions for gpu offloadManuel Drehwald-0/+82
2025-06-19fix markupTshepang Mbambo-2/+2
That was intended to be a list. Also, the order is not relevant.
2025-06-18Auto merge of #142689 - Urgau:rollup-4ho6835, r=Urgaubors-0/+2
Rollup of 6 pull requests Successful merges: - rust-lang/rust#135656 (Add `-Z hint-mostly-unused` to tell rustc that most of a crate will go unused) - rust-lang/rust#138237 (Get rid of `EscapeDebugInner`.) - rust-lang/rust#141614 (lint direct use of rustc_type_ir ) - rust-lang/rust#142123 (Implement initial support for timing sections (`--json=timings`)) - rust-lang/rust#142377 (Try unremapping compiler sources) - rust-lang/rust#142674 (remove duplicate crash test) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-18Rollup merge of #142377 - Urgau:unremap-rustc-dev, r=jieyouxuUrgau-0/+2
Try unremapping compiler sources See [#t-compiler/help > Span pointing to wrong file location (`rustc-dev` component)](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Span.20pointing.20to.20wrong.20file.20location.20.28.60rustc-dev.60.20component.29/with/521087083). This PR is a follow-up to rust-lang/rust#141751 regarding the compiler side. Specifically we now take into account the `CFG_VIRTUAL_RUSTC_DEV_SOURCE_BASE_DIR` env from rust-lang/rust#141751 when trying to unremap sources from `$sysroot/lib/rustlib/rustc-src/rust` (the `rustc-dev` component install directory). Best reviewed commit by commit. cc ``@samueltardieu`` r? ``@jieyouxu``
2025-06-18Merge pull request #2474 from BoxyUwU/ambig_unambig_ty_constsBoxy-6/+70
Document Ambig vs Unambig Type/Consts
2025-06-18ReviewsBoxy-12/+12
2025-06-18Fix compiletest and rustc-dev-guideJakub Beránek-1/+1
2025-06-17Add linksBoxy-9/+19
2025-06-17Write chapter on Unambig vs Ambig Types/ConstsBoxy-1/+53
2025-06-17Stub chapter and consolidate under `/hir/`Boxy-6/+8
2025-06-17Profiling with perf: specify the section of bootstrap settings.lolbinarycat-2/+2
2025-06-16Remove hanging parenthesis from example signature.Chris Bloodsworth-2/+2
Also replaced '→' symbol with '->' for consistency across the table.
2025-06-16Use stage 1 for building docsAlice Ryhl-1/+1
2025-06-15Un-remap `rustc-dev` component pathsUrgau-0/+2
2025-06-14do not inline linksTshepang Mbambo-2/+5
2025-06-14title caseTshepang Mbambo-1/+1
2025-06-14use sentence caseTshepang Mbambo-11/+11
2025-06-14content has moved to another chapterTshepang Mbambo-2/+2
2025-06-14Merge pull request #2465 from xizheyin/rustc-queryTshepang Mbambo-39/+46
Adjust some doc for Query System
2025-06-14Merge pull request #2441 from rust-lang/tshepang-remove-title-caseTshepang Mbambo-28/+28
use consistent title capitalization
2025-06-14Rollup merge of #141811 - mejrs:bye_locals, r=compiler-errorsMatthias Krüger-2/+2
Unimplement unsized_locals Implements https://github.com/rust-lang/compiler-team/issues/630 Tracking issue here: https://github.com/rust-lang/rust/issues/111942 Note that this just removes the feature, not the implementation, and does not touch `unsized_fn_params`. This is because it is required to support `Box<dyn FnOnce()>: FnOnce()`. There may be more that should be removed (possibly in follow up prs) - the `forget_unsized` function and `forget` intrinsic. - the `unsized_locals` test directory; I've just fixed up the tests for now - various codegen support for unsized values and allocas cc ``@JakobDegen`` ``@oli-obk`` ``@Noratrieb`` ``@programmerjake`` ``@bjorn3`` ``@rustbot`` label F-unsized_locals Fixes rust-lang/rust#79409
2025-06-13Adjust some doc for Query Systemxizheyin-39/+46
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-06-13Unimplement unsized_localsmejrs-2/+2
2025-06-12Merge from rustcThe rustc-dev-guide Cronjob Bot-0/+1
2025-06-12Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-06-11Rollup merge of #142297 - jieyouxu:needs-target-std, r=KobzolMatthias Krüger-0/+1
Implement `//@ needs-target-std` compiletest directive Closes rust-lang/rust#141863. Needed to unblock rust-lang/rust#139244 and rust-lang/rust#141856. ### Summary This PR implements a `//@ needs-target-std` compiletest directive that gates test execution based on whether the target supports std or not. For some cases, this should be preferred over e.g. some combination of `//@ ignore-none`, `//@ ignore-nvptx` and more[^none-limit]. ### Implementation limitation Unfortunately, since there is currently [no reliable way to determine from metadata whether a given target supports std or not](https://github.com/rust-lang/rust/issues/142296), we have to resort to a hack. Bootstrap currently determines whether or not a target supports std by a naive target tuple substring comparison: a target supports std if its target tuple does *not* contain one of `["-none", "nvptx", "switch"]` substrings. This PR simply pulls that hack out into `build_helpers` to avoid reimplementing the same hack in compiletest, and uses that logic to inform `//@ needs-target-std`. ### Auxiliary changes This PR additionally changes a few run-make tests to use `//@ needs-target-std` over an inconsistent combination of target-based `ignore`s. This should help with rust-lang/rust#139244. --- r? bootstrap [^none-limit]: Notably, `target_os = "none"` is **not** a sufficient condition for "target does not support std"
2025-06-11that was phrased like a separate sentenceTshepang Mbambo-1/+1
2025-06-10Using git § I changed a submodule by accident: be explicitlolbinarycat-1/+2
Rewriting git history is something that is often difficult for new contributors, and we're already explaining the `<foo>` placeholder syntax, so I think it makes sense to be explicit about what exactly the paths mean.
2025-06-10Document `//@ needs-target-std` in rustc-dev-guideJieyou Xu-0/+1
2025-06-09Merge from rustcThe rustc-dev-guide Cronjob Bot-0/+8
2025-06-09Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-06-08remove the archived ICE ping groupscyrgani-144/+4
2025-06-07Fix typoLeón Orell Valerian Liehr-3/+4