about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
AgeCommit message (Collapse)AuthorLines
2025-02-20Rewrite effects checking chapterDeadbeef-67/+131
2025-02-20Merge pull request #2256 from torfsen/fix-examples-for-nightly-2025-02-13许杰友 Jieyou Xu (Joe)-14/+37
2025-02-19Rollup merge of #137227 - epage:features_untracked, r=compiler-errorsMatthias Krüger-3/+1
docs(dev): Update the feature-gate instructions `features_untracked` was removed in #114723 features are now functions as of #132027
2025-02-19Rollup merge of #127793 - ChaiTRex:zed_support, r=KobzolMatthias Krüger-0/+11
Added project-specific Zed IDE settings This repository currently has project-specific VS Code IDE settings in `.vscode` and `compiler/rustc_codegen_cranelift/.vscode`. Now there are equivalent project-specific Zed IDE settings alongside those. This fixes `rust-analyzer` not being able to properly handle this project. Note that: 1. The contents of `src/tools/rust-analyzer/.vscode` could not be translated to Zed, as they aren't basic IDE settings. 2. One of the VS Code settings in `.vscode` has no corresponding setting in Zed, and so this has been noted like this: ```json "_settings_only_in_vs_code_not_yet_in_zed": { "git.detectSubmodulesLimit": 20 }, ```
2025-02-19add rustc-dev doc about bootstrap toolsonur-ozkan-0/+24
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18docs(dev): Access features as functions, not membersEd Page-1/+1
This was changed in #132027
2025-02-18docs(dev): Remove reference to features_untrackedEd Page-3/+1
This was removed in #114723
2025-02-17Add Zed to dev guide suggested workflows pageChai T. Rex-0/+11
2025-02-17Update documentationJakub Beránek-4/+13
2025-02-17Rollup merge of #137080 - jieyouxu:more-tracing, r=onur-ozkanMatthias Krüger-0/+8
bootstrap: add more tracing to compiler/std/llvm flows - Add more tracing to compiler/std/llvm flows. - Two drive-by nits: 1. Take `TargetSelection` by-value for `builder.is_builder_target()`. Noticed while adding tracing; follow-up to #136767. 2. Coalesce enzyme build logic into one branch. - Document `COMPILER{,_FOR}` tracing targets for #96176. - No functional changes. ### Testing You can play with the tracing locally with: ``` $ BOOTSTRAP_TRACING=bootstrap=debug ./x build library $ BOOTSTRAP_TRACING=bootstrap=trace ./x build library $ BOOTSTRAP_TRACING=bootstrap=trace,COMPILER=trace,COMPILER_FOR=trace ./x build library ``` ### Previews ``` $ BOOTSTRAP_TRACING=bootstrap=debug ./x build library ``` ![Screenshot 2025-02-15 230824](https://github.com/user-attachments/assets/c3b02b62-d52e-4c03-a00a-da0d95618989) ``` $ BOOTSTRAP_TRACING=bootstrap=trace,COMPILER=trace,COMPILER_FOR=trace ./x build library ``` ![Screenshot 2025-02-15 233859](https://github.com/user-attachments/assets/842e4ece-4c26-4191-acbb-5f93e42de4dc) r? ``@onur-ozkan`` (or reroll)
2025-02-17Move some `Map` methods onto `TyCtxt`.Nicholas Nethercote-1/+1
The end goal is to eliminate `Map` altogether. I added a `hir_` prefix to all of them, that seemed simplest. The exceptions are `module_items` which became `hir_module_free_items` because there was already a `hir_module_items`, and `items` which became `hir_free_items` for consistency with `hir_module_free_items`.
2025-02-16Bump mdbook-linkcheck2 dependency versionMartin Liska-1/+1
2025-02-16rustc-dev-guide: document `COMPILER` and `COMPILER_FOR` tracing targets许杰友 Jieyou Xu (Joe)-0/+8
2025-02-15Merge pull request #2246 from marxin/CI-more-ofterNoah Lev-2/+2
Run CI multiple times a day
2025-02-15Merge pull request #2254 from marxin/start-using-latest-linkcheck2Noah Lev-1/+1
Start using latest release where -f checks all local links
2025-02-15Fix CI scheduleMartin Liska-1/+1
2025-02-15Fix examples to work with nightly-2025-02-13Florian Brucker-14/+37
While there were comments indicating which nightly versions the examples were tested with, those versions did not work for me: neither did the examples compile, nor did they produce the expected output. This commit fixes the compilation issues, using nightly-2025-02-13 for all examples (previously the version differed between the examples) and, in the case of the `rustc_driver` examples, also fixes the argument passing: rustc ignores the first argument, so we need to pass the filename as the second (otherwise we only get the help text printed). Note that the `rustc-interface-getting-diagnostics.rs` example still does not produce any output, which I assume is not how it is intended. However, I don't know enough to fix it. To avoid inconsistencies between the documented version and the actually required version I've moved the version comment from the Markdown into the Rust code where it hopefully won't be forgotten as easily. Finally I've clarified in the examples' README that you also need to use the proper nightly version when compiling the examples, not just when running them.
2025-02-15rustc-dev-guide: document `{ignore,only}-rustc_abi-x86-sse2`许杰友 Jieyou Xu (Joe)-0/+1
2025-02-14Merge pull request #2252 from chenyukang/fix-perf许杰友 Jieyou Xu (Joe)-0/+7
Add note for perf issue
2025-02-14Start using latest release where -f checks all local linksMartin Liska-1/+1
2025-02-14Fix borked linkMartin Liska-1/+1
2025-02-14add notes for perf issueyukang-0/+7
2025-02-13Rollup merge of #136924 - Kobzol:bootstrap-tracing, r=jieyouxuJubilee-0/+8
Add profiling of bootstrap commands using Chrome events Since we now have support for tracing in bootstrap, and the execution of most commands is centralized within a few functions, it's quite trivial to also trace command execution, and visualize it using the Chrome profiler. This can be helpful both to profile what takes time in bootstrap and also to get a visual idea of what happens in a given bootstrap invocation (since the execution of external commands is usually the most interesting thing). This is how it looks: ![image](https://github.com/user-attachments/assets/3351489e-3a0f-4729-9082-5bf40c586d4b) I first tried to use [tracing-flame](https://github.com/tokio-rs/tracing/tree/master/tracing-flame), but the output wasn't very useful, because the event/stackframe names were bootstrap code locations, instead of the command contents. r? ``@jieyouxu``
2025-02-13Auto merge of #136593 - lukas-code:ty-value-perf, r=oli-obkbors-2/+2
valtree performance tuning Summary: This PR makes type checking of code with many type-level constants faster. After https://github.com/rust-lang/rust/pull/136180 was merged, we observed a small perf regression (https://github.com/rust-lang/rust/pull/136318#issuecomment-2635562821). This happened because that PR introduced additional copies in the fast reject code path for consts, which is very hot for certain crates: https://github.com/rust-lang/rust/blob/6c1d960d88dd3755548b3818630acb63fa98187e/compiler/rustc_type_ir/src/fast_reject.rs#L486-L487 This PR improves the performance again by properly interning the valtrees so that copying and comparing them becomes faster. This will become especially useful with `feature(adt_const_params)`, so the fast reject code doesn't have to do a deep compare of the valtrees. Note that we can't just compare the interned consts themselves in the fast reject, because sometimes `'static` lifetimes in the type are be replaced with inference variables (due to canonicalization) on one side but not the other. A less invasive alternative that I considered is simply avoiding copies introduced by https://github.com/rust-lang/rust/pull/136180 and comparing the valtrees it in-place (see commit: https://github.com/rust-lang/rust/commit/9e91e50ac5920f0b9b4a3b1e0880c85336ba5c64 / perf results: https://github.com/rust-lang/rust/pull/136593#issuecomment-2642303245), however that was still measurably slower than interning. There are some minor regressions in secondary benchmarks: These happen due to changes in memory allocations and seem acceptable to me. The crates that make heavy use of valtrees show no significant changes in memory usage.
2025-02-13Document bootstrap profilingJakub Beránek-0/+8
2025-02-13Rollup merge of #136858 - safinaskar:parallel-cleanup-2025-02-11-07-54, ↵Jacob Pratt-5/+0
r=SparrowLii Parallel-compiler-related cleanup Parallel-compiler-related cleanup I carefully split changes into commits. Commit messages are self-explanatory. Squashing is not recommended. cc "Parallel Rustc Front-end" https://github.com/rust-lang/rust/issues/113349 r? SparrowLii ``@rustbot`` label: +WG-compiler-parallel
2025-02-12document bootstrap loggingjyn-2/+41
2025-02-13intern valtreesLukas Markeffsky-2/+2
2025-02-12Rollup merge of #136871 - madsmtm:link-to-lang-procedures, r=scottmcmGuillaume Gomez-0/+4
dev-guide: Link to `t-lang` procedures for new features I was confused in https://github.com/rust-lang/rust/pull/136867, because while I did remember that such a procedure existed, but I couldn't seem to find it in the dev guide.
2025-02-12Auto merge of #135336 - tshepang:patch-5, r=jieyouxubors-0/+2
clarify and document needs-dynamic-linking try-job: test-various
2025-02-12Run CI multiple times a dayMartin Liska-2/+2
2025-02-11document the directiveTshepang Mbambo-0/+2
2025-02-11dev-guide: Link to t-lang procedures for new featuresMads Marquart-0/+4
2025-02-11src/doc/rustc-dev-guide/src/parallel-rustc.md: remove Arc and Rc (it seems ↵Askar Safin-2/+0
they are left-over after my PR)
2025-02-11compiler/rustc_data_structures/src/sync.rs: remove atomics, but not AtomicU64!Askar Safin-1/+0
2025-02-11compiler/rustc_data_structures/src/sync.rs: delete WeakAskar Safin-1/+0
2025-02-11compiler/rustc_data_structures/src/sync.rs: delete MappedLockGuardAskar Safin-1/+0
It seems it is left-over after some refactoring
2025-02-10Merge from rustcThe rustc-dev-guide Cronjob Bot-9/+6
2025-02-10Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-02-09Rollup merge of #136530 - Kobzol:x-perf, r=onur-ozkanUrgau-3/+1
Implement `x perf` directly in bootstrap Discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Turning.20.60x.20perf.60.20into.20a.20first.20class.20command). Implementing the command directly in bootstrap let's us correctly build the compiler toolchain based on input arguments (such as include rustdoc in the toolchain [only] when needed), and it also makes the CLI interface nicer. r? ``@onur-ozkan``
2025-02-07Remove reference to enum.RevealMartin Liska-4/+2
2025-02-06Update links to type schemasMichael Howell-4/+4
What used to be in externs.js is now in rustdoc.d.ts.
2025-02-06improve CI cache docsMarcoIeni-4/+20
2025-02-06Replace link with a https based oneMartin Liska-1/+1
2025-02-05Update rustc-dev-guideJakub Beránek-3/+1
2025-02-04Merge pull request #2243 from Kobzol/pull-cron许杰友 Jieyou Xu (Joe)-2/+2
2025-02-03Make the rustc-pull workflow run less oftenJakub Beránek-2/+2
2025-02-04Merge pull request #2242 from DuskyElf/master许杰友 Jieyou Xu (Joe)-1/+0
2025-02-03overlong lineTshepang Mbambo-2/+4
2025-02-04Remove "Port run-make tests from Make to Rust" tracking issue from Recurring ↵Rehmatpal Singh-1/+0
work