about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-04-05add change-entryonur-ozkan-0/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-05utilize `compiletest_use_stage0_libtest` optiononur-ozkan-1/+4
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-05create new option `build.compiletest-use-stage0-libtest`onur-ozkan-0/+6
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-05 the rustdoc file prefix for constants is "constant" not "const"Jonathan Chan Kwan Yin-1/+1
2025-04-05Switch `time` to `jiff` for time formatting in ICE dumpsclubby789-8/+3
2025-04-05Rollup merge of #139092 - thaliaarchi:move-fd-pal, r=joboetMatthias Krüger-2/+2
Move `fd` into `std::sys` Move platform definitions of `fd` into `std::sys`, as part of https://github.com/rust-lang/rust/issues/117276. Unlike other modules directly under `std::sys`, this is only available on some platforms and I have not provided a fallback abstraction for unsupported platforms. That is similar to how `std::os::fd` is gated to only supported platforms. Also, fix the `unsafe_op_in_unsafe_fn` lint, which was allowed for the Unix fd impl. Since macro expansions from `std::sys::pal::unix::weak` trigger this lint, fix it there too. cc `@joboet,` `@ChrisDenton` try-job: x86_64-gnu-aux
2025-04-04Move fd into sysThalia Archibald-2/+2
2025-04-05Rollup merge of #139274 - lolbinarycat:rustdoc-js-less-expect-error-part5, ↵Stuart Cook-46/+100
r=notriddle Rustdoc: typecheck settings.js This makes the file fully typechecked with no instances of ``````@ts-expect-error`````` and no type casts. r? `````@notriddle`````
2025-04-05Rollup merge of #138024 - reitermarkus:unicode-panic-optimization, r=ibraheemdevStuart Cook-39/+98
Allow optimizing out `panic_bounds_check` in Unicode checks. Allow optimizing out `panic_bounds_check` in Unicode checks. For context, see https://github.com/japaric/ufmt/issues/52#issuecomment-2699207241.
2025-04-05Rollup merge of #136457 - calder:master, r=tgross35Stuart Cook-4/+4
Expose algebraic floating point intrinsics # Problem A stable Rust implementation of a simple dot product is 8x slower than C++ on modern x86-64 CPUs. The root cause is an inability to let the compiler reorder floating point operations for better vectorization. See https://github.com/calder/dot-bench for benchmarks. Measurements below were performed on a i7-10875H. ### C++: 10us ✅ With Clang 18.1.3 and `-O2 -march=haswell`: <table> <tr> <th>C++</th> <th>Assembly</th> </tr> <tr> <td> <pre lang="cc"> float dot(float *a, float *b, size_t len) { #pragma clang fp reassociate(on) float sum = 0.0; for (size_t i = 0; i < len; ++i) { sum += a[i] * b[i]; } return sum; } </pre> </td> <td> <img src="https://github.com/user-attachments/assets/739573c0-380a-4d84-9fd9-141343ce7e68" /> </td> </tr> </table> ### Nightly Rust: 10us ✅ With rustc 1.86.0-nightly (8239a37f9) and `-C opt-level=3 -C target-feature=+avx2,+fma`: <table> <tr> <th>Rust</th> <th>Assembly</th> </tr> <tr> <td> <pre lang="rust"> fn dot(a: &[f32], b: &[f32]) -> f32 { let mut sum = 0.0; for i in 0..a.len() { sum = fadd_algebraic(sum, fmul_algebraic(a[i], b[i])); } sum } </pre> </td> <td> <img src="https://github.com/user-attachments/assets/9dcf953a-2cd7-42f3-bc34-7117de4c5fb9" /> </td> </tr> </table> ### Stable Rust: 84us ❌ With rustc 1.84.1 (e71f9a9a9) and `-C opt-level=3 -C target-feature=+avx2,+fma`: <table> <tr> <th>Rust</th> <th>Assembly</th> </tr> <tr> <td> <pre lang="rust"> fn dot(a: &[f32], b: &[f32]) -> f32 { let mut sum = 0.0; for i in 0..a.len() { sum += a[i] * b[i]; } sum } </pre> </td> <td> <img src="https://github.com/user-attachments/assets/936a1f7e-33e4-4ff8-a732-c3cdfe068dca" /> </td> </tr> </table> # Proposed Change Add `core::intrinsics::f*_algebraic` wrappers to `f16`, `f32`, `f64`, and `f128` gated on a new `float_algebraic` feature. # Alternatives Considered https://github.com/rust-lang/rust/issues/21690 has a lot of good discussion of various options for supporting fast math in Rust, but is still open a decade later because any choice that opts in more than individual operations is ultimately contrary to Rust's design principles. In the mean time, processors have evolved and we're leaving major performance on the table by not supporting vectorization. We shouldn't make users choose between an unstable compiler and an 8x performance hit. # References * https://github.com/rust-lang/rust/issues/21690 * https://github.com/rust-lang/libs-team/issues/532 * https://github.com/rust-lang/rust/issues/136469 * https://github.com/calder/dot-bench * https://www.felixcloutier.com/x86/vfmadd132ps:vfmadd213ps:vfmadd231ps try-job: x86_64-gnu-nopt try-job: x86_64-gnu-aux
2025-04-04Expose algebraic floating point intrinsicsCalder Coalson-4/+4
2025-04-04Add `rustc-literal-escaper` to allowed crates listsGuillaume Gomez-0/+2
2025-04-04Update `rustc-literal-escaper` version to `0.0.2`Guillaume Gomez-4/+4
2025-04-04bootstrap: Only add `rustc_randomized_layouts` if the crate has itGuillaume Gomez-1/+1
2025-04-04Rollup merge of #139378 - Kobzol:bootstrap-use-lld-fix, r=petrochenkovMatthias Krüger-2/+2
Use target-agnostic LLD flags in bootstrap for `use-lld` [Before](https://github.com/rust-lang/rust/pull/135001), I hardcoded LLD flags that pretty much only worked on GNU. The right way is to use `-Zlinker-features` instead though. I *think* that this should also make this work on Windows mingw, and thus `@petrochenkov's` workaround is no longer necessary. Fixes: https://github.com/rust-lang/rust/issues/139372 Closes: https://github.com/rust-lang/rust/pull/139375 r? `@lqd`
2025-04-04Rollup merge of #139339 - mejrs:tait, r=oli-obkMatthias Krüger-0/+159
unstable book: document tait Documents the type alias impl trait feature. Rendered: ![image](https://github.com/user-attachments/assets/1d904ff9-e1e1-4ef0-a62d-cbe2d480dce0) ![image](https://github.com/user-attachments/assets/9e877ad1-0f73-4ead-a4ac-0e106512cef8) ![image](https://github.com/user-attachments/assets/86663a23-9824-406d-a5e1-1e0c1662b5f5) because you are deeply involved in this I'll r you but feel free to reroll r? `@oli-obk`
2025-04-04Rollup merge of #139328 - GuillaumeGomez:fix-panic-output-137970, r=fmeaseMatthias Krüger-3/+5
Fix 2024 edition doctest panic output Fixes #137970. The problem was that the output was actually displayed by rustc itself because we're exiting with `Result<(), String>`, and the display is really not great. So instead, we get the output, we print it and then we return an `ExitCode`. r? ````@aDotInTheVoid````
2025-04-04Merge pull request #19519 from snprajwal/project-control-no-depsLukas Wirth-2/+31
feat(project-model): provide flag for no deps
2025-04-04Update windows-bindgen to 0.61.0Chris Denton-1/+1
2025-04-04Merge pull request #4251 from RalfJung/cargo-updateRalf Jung-710/+673
Cargo update
2025-04-04Use target-agnostic LLD flags in bootstrap for use-lldJakub Beránek-2/+2
2025-04-04internal: fix salsa-ified crate graph working with lazy project discoveryDavid Barsky-31/+23
2025-04-04Solaris does not have flockRalf Jung-0/+3
2025-04-04Merge pull request #19522 from ↵Lukas Wirth-1/+3
davidbarsky/davidbarsky/fix-panic-in-view-crate-graph internal: fix panic in `view_crate_graph`
2025-04-04Merge pull request #19515 from jrmuizel/multiple-definitionsLukas Wirth-7/+102
fix: don't drop references with more than one definition.
2025-04-04Auto merge of #137869 - ↵bors-42/+45
Noratrieb:Now_I_am_become_death,_the_destroyer_of_i686-pc-windows-gnu, r=workingjubilee Demote i686-pc-windows-gnu to Tier 2 In accordance with [RFC 3771](https://github.com/rust-lang/rfcs/pull/3771). FCP has been completed. tracking issue #138422 I also added a stub doc page for the target and renamed the windows-gnullvm page for consistency.
2025-04-04internal: fix panic in `view_crate_graph`David Barsky-1/+3
2025-04-04fix: don't drop references with more than one definition.Jeff Muizelaar-7/+102
Implicit field references during struct initialization were being dropped because get_definition was returning None because there were multiple definitions. This adds a new helper, `get_defintions`, that supports returning more than one definition for a given token and hooks it up. Fixes #19393
2025-04-04prefer default over newBenjaminBrienen-125/+98
2025-04-04fix windows_join_multipleRalf Jung-2/+8
2025-04-04feat(project-model): provide flag for no depsPrajwal S N-2/+31
A Cargo project can now be built without any dependency metadata being fetched. Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-04Merge pull request #4250 from asomers/patch-1Ralf Jung-0/+1
Add another Miri-detected bug to README.md
2025-04-04Remove usage of `rustc_lexer::unescape` in rust-analyzerGuillaume Gomez-18/+21
2025-04-04Update README.md Alan Somers-1/+1
verb -> participle Co-authored-by: Ralf Jung <post@ralfj.de>
2025-04-04bump parts of test-cargo-miri to edition 2024Ralf Jung-44/+59
2025-04-04chore: clean up some FIXMEsPrajwal S N-47/+36
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-04cargo updateRalf Jung-495/+546
2025-04-04semver-bump some dependenciesRalf Jung-230/+133
2025-04-04Rollup merge of #139322 - Kobzol:run-make-lld-refactor, r=jieyouxuMatthias Krüger-0/+37
Add helper function for checking LLD usage to `run-make-support` Extracted out of https://github.com/rust-lang/rust/pull/138645, should be a simple refactoring. r? ``@jieyouxu``
2025-04-04Rollup merge of #139317 - Zalathar:hide-libtest, r=jieyouxuMatthias Krüger-105/+208
compiletest: Encapsulate all of the code that touches libtest Compiletest currently relies on unstable libtest APIs in order to actually execute tests. That's unfortunate, but removing the dependency isn't trivial. However, we can make a small step towards removing the libtest dependency by encapsulating the libtest interactions into a single dedicated module. That makes it easier to see what parts of libtest are actually used. --- As a side-effect of moving the `test_opts` function into that dedicated module, this PR also ends up allowing `--fail-fast` to be passed on the command line, instead of requiring an environment variable. --- There is still (at least) one other aspect of the libtest dependency that this PR does not address, namely the fact that we rely on libtest's output capture (via unstable std APIs) to capture the output that we print during individual tests. I hope to do something about that at some point. r? jieyouxu
2025-04-04Update book.toml fix the authors fieldGábor Szabó-1/+1
See https://rust-lang.github.io/mdBook/format/configuration/general.html#general-metadata
2025-04-04bootstrap: only build `rust_test_helpers` for `{incremental,ui}` suitesJieyou Xu-10/+9
2025-04-04Fix linksmejrs-4/+4
2025-04-04fix language-configuration.jsonBenjaminBrienen-3/+3
2025-04-04unstable book: document taitmejrs-0/+159
2025-04-03add some links about the rustdoc-gui test suitebinarycat-1/+5
2025-04-03Stabilize the `cell_update` featureTrevor Gross-1/+0
Included API: impl<T: Copy> Cell<T> { pub fn update(&self, f: impl FnOnce(T) -> T); } Closes: https://github.com/rust-lang/rust/issues/50186
2025-04-03Rollup merge of #139255 - GuillaumeGomez:unused-var-merged-doctest, r=fmeaseMatthias Krüger-1/+0
Remove unused variables generated in merged doctests The variable is unused so no need to keep it around. cc `@notriddle` r? `@camelid`
2025-04-03Rollup merge of #138610 - oli-obk:no-sort-hir-ids, r=compiler-errorsMatthias Krüger-33/+53
impl !PartialOrd for HirId revive of https://github.com/rust-lang/rust/pull/92233 Another checkbox of https://github.com/rust-lang/rust/issues/90317, another small step in making incremental less likely to die in horrible ways
2025-04-03Rollup merge of #138017 - nnethercote:tighten-assignment-op, r=spastorinoMatthias Krüger-35/+62
Tighten up assignment operator representations. This is step 3 of [MCP 831](https://github.com/rust-lang/compiler-team/issues/831). r? `@spastorino`