about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2025-02-19Auto merge of #137290 - matthiaskrgr:rollup-a7xdbi4, r=matthiaskrgrbors-4/+6
Rollup of 8 pull requests Successful merges: - #120580 (Add `MAX_LEN_UTF8` and `MAX_LEN_UTF16` Constants) - #132268 (Impl TryFrom<Vec<u8>> for String) - #136093 (Match Ergonomics 2024: update old-edition behavior of feature gates) - #136344 (Suggest replacing `.` with `::` in more error diagnostics.) - #136690 (Use more explicit and reliable ptr select in sort impls) - #136815 (CI: Stop /msys64/bin from being prepended to PATH in msys2 shell) - #136923 (Lint `#[must_use]` attributes applied to methods in trait impls) - #137155 (Organize `OsString`/`OsStr` shims) r? `@ghost` `@rustbot` modify labels: rollup
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-18"classic2021" ruleset: experimentally add fallback-to-outer (eat both)dianne-1/+1
My reasoning: the ruleset implemented by the same feature gate in Edition 2024 always tries to eat the inherited reference first. For consistency, it makes sense to me to say across all editions that users should consider the inherited reference's mutability when wondering if a `&mut` pattern will type.
2025-02-18update unstable bookdianne-4/+6
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-17Rollup merge of #137166 - nikic:loongarch-code-model, r=workingjubileeMatthias Krüger-1/+1
Update default loongarch code model in docs Since https://github.com/rust-lang/rust/pull/130266 loongarch defaults to medium code model.
2025-02-17Update default loongarch code model in docsNikita Popov-1/+1
Since https://github.com/rust-lang/rust/pull/130266 loongarch defaults to medium code model.
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-16rustc-dev-guide: document `COMPILER` and `COMPILER_FOR` tracing targets许杰友 Jieyou Xu (Joe)-0/+8
2025-02-15rustc-dev-guide: document `{ignore,only}-rustc_abi-x86-sse2`许杰友 Jieyou Xu (Joe)-0/+1
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-13Make `-O` mean `-C opt-level=3`clubby789-2/+2
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-13Rollup merge of #134999 - Berrysoft:dev/new-cygwin-target, ↵Jacob Pratt-0/+41
r=chenyukang,workingjubilee Add cygwin target. This PR simply adds cygwin target together with msys2 target, based on ````@ookiineko```` 's (the account has been deleted) [work](https://github.com/ookiineko-cygport/rust) on cygwin target. My full work is here: https://github.com/rust-lang/rust/compare/master...Berrysoft:rust:dev/cygwin I have succeeded in building a new rustc for cygwin target, and eventually distributed a new version of [fish-shell](https://github.com/Berrysoft/fish-shell/releases) (rewritten by Rust) for MSYS2. I will open a new PR to fix std if this PR is accepted.
2025-02-12Rollup merge of #136937 - rustbot:docs-update, r=ehussJacob Pratt-0/+0
Update books ## rust-lang/book 1 commits in e2fa4316c5a7c0d2499c5d6b799adcfad6ef7a45..d4d2c18cbd20876b2130a546e790446a8444cb32 2025-02-12 16:22:54 UTC to 2025-02-12 16:22:54 UTC - Fix example for `cargo fix` (rust-lang/book#4226) ## rust-lang/reference 3 commits in de2d5289e45506b11dd652bef4f99de64be70e1c..6195dbd70fc6f0980c314b4d23875ac570d8253a 2025-02-12 15:40:30 UTC to 2025-02-11 20:35:17 UTC - Revert "Update function-pointer.md for stabilization of `extended_varargs_abi_support`" (rust-lang/reference#1734) - Rework error handling in mdbook-spec (rust-lang/reference#1733) - `as` cast improvements (rust-lang/reference#1732)
2025-02-12Rollup merge of #136217 - taiki-e:csky-asm-flags, r=AmanieuJacob Pratt-0/+2
Mark condition/carry bit as clobbered in C-SKY inline assembly C-SKY's compare and some arithmetic/logical instructions modify condition/carry bit (C) in PSR, but there is currently no way to mark it as clobbered in `asm!`. This PR marks it as clobbered except when [`options(preserves_flags)`](https://doc.rust-lang.org/reference/inline-assembly.html#r-asm.options.supported-options.preserves_flags) is used. Refs: - Section 1.3 "Programming model" and Section 1.3.5 "Condition/carry bit" in CSKY Architecture user_guide: https://github.com/c-sky/csky-doc/blob/9f7121f7d40970ba5cc0f15716da033db2bb9d07/CSKY%20Architecture%20user_guide.pdf > Under user mode, condition/carry bit (C) is located in the lowest bit of PSR, and it can be accessed and changed by common user instructions. It is the only data bit that can be visited under user mode in PSR. > Condition or carry bit represents the result after one operation. Condition/carry bit can be clearly set according to the results of compare instructions or unclearly set as some high-precision arithmetic or logical instructions. In addition, special instructions such as DEC[GT,LT,NE] and XTRB[0-3] will influence the value of condition/carry bit. - Register definition in LLVM: https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/CSKY/CSKYRegisterInfo.td#L88 cc ```@Dirreke``` ([target maintainer](https://github.com/rust-lang/rust/blob/aa6f5ab18e67cb815f73e0d53d217bc54b0da924/src/doc/rustc/src/platform-support/csky-unknown-linux-gnuabiv2.md#target-maintainers)) r? ```@Amanieu``` ```@rustbot``` label +O-csky +A-inline-assembly
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-12Update booksrustbot-0/+0
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-12Auto merge of #136918 - GuillaumeGomez:rollup-f6h21gg, r=GuillaumeGomezbors-97/+158
Rollup of 8 pull requests Successful merges: - #134981 ( Explain that in paths generics can't be set on both the enum and the variant) - #136698 (Replace i686-unknown-redox target with i586-unknown-redox) - #136767 (improve host/cross target checking) - #136829 ([rustdoc] Move line numbers into the `<code>` directly) - #136875 (Rustc dev guide subtree update) - #136900 (compiler: replace `ExternAbi::name` calls with formatters) - #136913 (Put kobzol back on review rotation) - #136915 (documentation fix: `f16` and `f128` are not double-precision) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-12Rollup merge of #136875 - BoxyUwU:rdg-push, r=jieyouxuGuillaume Gomez-94/+155
Rustc dev guide subtree update r? ``@ghost``
2025-02-12Rollup merge of #136698 - jackpot51:i586-redox, r=RalfJungGuillaume Gomez-3/+3
Replace i686-unknown-redox target with i586-unknown-redox This change is related to https://github.com/rust-lang/rust/issues/136495
2025-02-12Auto merge of #136897 - workingjubilee:revert-unfcped-stab, r=WaffleLapkinbors-0/+10
Revert "Stabilize `extended_varargs_abi_support`" I cannot find an FCP for this, despite it being a stabilization PR which normally means we do an FCP of some kind? It would seem reasonable for _either_ compiler or lang to have FCPed it? I am thus opening a revert PR, which mostly-cleanly applies, so that we can later actually land this properly with a stability report and FCP. - https://github.com/rust-lang/rust/issues/136896 - https://github.com/rust-lang/rust/pull/116161 - https://github.com/rust-lang/rust/issues/100189
2025-02-12Rollup merge of #136885 - RalfJung:linux-android-base-cpu, r=jieyouxuMatthias Krüger-1/+1
i686-linux-android: increase CPU baseline to Pentium 4 (without an actual change As per ``@maurer's`` [comment](https://github.com/rust-lang/rust/issues/136495#issuecomment-2648743078), this shouldn't actually change anything since we anyway add a bunch of extensions that bump things up way beyond Pentium 4. But Pentium 4 is consistent with the other i686 targets and I don't know enough about the exact sequence of CPU generations to be confident with more than this. ;)
2025-02-11Revert "Stabilize `extended_varargs_abi_support`"Jubilee Young-0/+10
This reverts commit 685f189b4307435b83d625fea397ef36dff4e955.
2025-02-11document the directiveTshepang Mbambo-0/+2
2025-02-11i686-linux-android: increase CPU baseline to Pentium 4 (without an actual ↵Ralf Jung-1/+1
change)
2025-02-11Rollup merge of #135285 - tbu-:pr_fix_typo4, r=GuillaumeGomezMatthias Krüger-1/+1
it-self → itself, build-system → build system, type-alias → type alias
2025-02-11dev-guide: Link to t-lang procedures for new featuresMads Marquart-0/+4
2025-02-11Auto merge of #136851 - jhpratt:rollup-ftijn95, r=jhprattbors-2/+2
Rollup of 11 pull requests Successful merges: - #136606 (Fix long lines which rustfmt fails to format) - #136663 (Stabilize `NonZero::count_ones`) - #136672 (library: doc: core::alloc::Allocator: trivial typo fix) - #136704 (Improve examples for file locking) - #136721 (cg_llvm: Reduce visibility of some items outside the `llvm` module) - #136813 (rustc_target: Add the fp16 target feature for AArch32) - #136830 (fix i686-unknown-hurd-gnu x87 footnote) - #136832 (Fix platform support table for i686-unknown-uefi) - #136835 (Stop using span hack for contracts feature gating) - #136837 (Overhaul how contracts are lowered on fn-like bodies) - #136839 (fix ensure_monomorphic_enough) r? `@ghost` `@rustbot` modify labels: rollup
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-11Rollup merge of #136832 - ehuss:fix-platform-table, r=compiler-errorsJacob Pratt-1/+1
Fix platform support table for i686-unknown-uefi This text was placed in the wrong column.
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-10Fix platform support table for i686-unknown-uefiEric Huss-1/+1
This text was placed in the wrong column.
2025-02-10fix i686-unknown-hurd-gnu x87 footnoteRalf Jung-1/+1
2025-02-10Update booksrustbot-0/+0
2025-02-10Update platform-support.mdJeremy Soller-1/+1
2025-02-10Add cygwin target.王宇逸-0/+41
Co-authored-by: Ookiineko <chiisaineko@protonmail.com> Co-authored-by: nora <48135649+Noratrieb@users.noreply.github.com> Co-authored-by: Jubilee <workingjubilee@gmail.com>
2025-02-10Auto merge of #134740 - Flakebi:amdgpu-target, r=workingjubileebors-0/+114
Add amdgpu target Add amdgpu target to rustc and enable the LLVM target. Fix compiling `core` with the amdgpu: The amdgpu backend makes heavy use of different address spaces. This leads to situations, where a pointer in one addrspace needs to be casted to a pointer in a different addrspace. `bitcast` is invalid for this case, `addrspacecast` needs to be used. Fix compilation failures that created bitcasts for such cases by creating pointer casts (which creates an `addrspacecast` under the hood) instead. MCP: https://github.com/rust-lang/compiler-team/issues/823 Tracking issue: #135024 Kinda related to the original amdgpu tracking issue #51575 (though that one has been closed for a while).
2025-02-10Merge from rustcThe rustc-dev-guide Cronjob Bot-60/+58
2025-02-10Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1