about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-07-23Hint that choose_pivot returns index in boundsKornel-10/+10
2025-07-23Merge pull request #1882 from klensy/depsFolkert de Vries-64/+23
drop few unused deps
2025-07-23Auto merge of #143412 - Kobzol:std-detect-in-stdlib, r=Amanieubors-817/+377
Move `std_detect` into stdlib This PR moves the `std_detect` crate from `stdarch` to be a part of rust-lang/rust instead. The first commit actually moves the whole directory from the stdarch Josh subtree, so that git blame history is kept intact. Then I had to make a few changes to appease `tidy`. The most complex thing here is porting the tests. We can't have `std_detect` both in r-l/r and stdarch, because they could get desynchronized, so we have to perform the move more or less "atomically", which means that we also have to port all the existing `std_detect` tests from the `stdarch` repository. The stdarch repo runs the following `std_detect` tests: ### Build The `build-std-detect.sh` script (https://github.com/rust-lang/stdarch/blob/e2b6512aed87df45294ae680181eeef7a802cd95/ci/build-std-detect.sh) builds `std_detect` using the nightly compiler for several targets. This will be subsumed by normal `x build library` on our Tier 1/2 targets. However, the stdarch repository also tests the following targets: - aarch64-unknown-freebsd - armv6-unknown-freebsd - powerpc-unknown-freebsd - powerpc64-unknown-freebsd - aarch64-unknown-openbsd Which we don't build/test on our CI currently. I think we have mostly two options here: 1) Ignore these targets 2) Create a special CI job that will build stage 1 rustc and then cross-compile std (or just the `std_detect` crate?) for these targets. ### Documentation The `dox.sh` script (https://github.com/rust-lang/stdarch/blob/3fec5adcd52a815f227805d4959a25b6402c7fd5/ci/dox.sh) builds and documents `std_detect` for several targets. All of them are Tier 2/we have `dist-` jobs for them, so I think that we can just skip this and let our normal CI subsume it? ### Tests The `run.sh` script (https://github.com/rust-lang/stdarch/blob/1b201cec2cca7465602a65ed6ae60517224b15f3/ci/run.sh) runs `cargo test` on `std_detect` with a bunch of variations of feature flags. This will be subsumed by `x test library` in our CI. The only problem is that `stdarch` runs these tests for a ludicrous number of targets: ``` - tuple: i686-unknown-linux-gnu - tuple: x86_64-unknown-linux-gnu - tuple: arm-unknown-linux-gnueabihf - tuple: armv7-unknown-linux-gnueabihf - tuple: aarch64-unknown-linux-gnu - tuple: aarch64_be-unknown-linux-gnu - tuple: riscv32gc-unknown-linux-gnu - tuple: riscv64gc-unknown-linux-gnu - tuple: powerpc-unknown-linux-gnu - tuple: powerpc64-unknown-linux-gnu - tuple: powerpc64le-unknown-linux-gnu - tuple: s390x-unknown-linux-gnu - tuple: i586-unknown-linux-gnu - tuple: nvptx64-nvidia-cuda - tuple: thumbv6m-none-eabi - tuple: thumbv7m-none-eabi - tuple: thumbv7em-none-eabi - tuple: thumbv7em-none-eabihf - tuple: loongarch64-unknown-linux-gnu - tuple: wasm32-wasip1 - tuple: x86_64-apple-darwin - tuple: x86_64-apple-ios-macabi - tuple: aarch64-apple-darwin - tuple: aarch64-apple-ios-macabi - tuple: x86_64-pc-windows-msvc - tuple: i686-pc-windows-msvc - tuple: aarch64-pc-windows-msvc - tuple: x86_64-pc-windows-gnu - tuple: aarch64-unknown-linux-gnu - tuple: aarch64_be-unknown-linux-gnu - tuple: armv7-unknown-linux-gnueabihf - tuple: loongarch64-unknown-linux-gnu - tuple: powerpc-unknown-linux-gnu - tuple: powerpc64-unknown-linux-gnu - tuple: powerpc64le-unknown-linux-gnu - tuple: riscv32gc-unknown-linux-gnu - tuple: riscv64gc-unknown-linux-gnu - tuple: s390x-unknown-linux-gnu - tuple: x86_64-unknown-linux-gnu - tuple: aarch64-apple-darwin - tuple: aarch64-apple-ios-macabi ``` We definitely do not run *tests* for all of these targets on our CI. # Outcome We have decided to just subsume std_detect tests by our normal test suite for now, and not create a separate CI job. Therefore, this PR performs the following changes in target testing for `std_detect`: The following T3 targets would go from "build" to "nothing": ``` aarch64-unknown-freebsd (T3) armv6-unknown-freebsd (T3) powerpc-unknown-freebsd (T3) powerpc64-unknown-freebsd (T3) aarch64-unknown-openbsd (T3) ``` The following T3 targets would go from "test" to "nothing": ``` aarch64_be-unknown-linux-gnu (T3) riscv32gc-unknown-liux-gnu (T3) ``` The following T2 targets would go from "test" to "build": ``` arm-unknown-linux-gnueabihf (T2) armv7-unknown-linux-gnueabihf (T2) riscv64gc-unknown-linux-gnu (T2) powerpc-unknown-linux-gnu (T2) powerpc64-unknown-linux-gnu (T2) powerpc64le-unknown-linux-gnu (T2) s390x-unknown-linux-gnu (T2) i586-unknown-linux-gnu (T2) loongarch64-unknown-linux-gnu (T2) wasm32-wasip1 (T2) x86_64-apple-ios-macabi (T2) aarch64-apple-ios-macabi (T2) aarch64-pc-windows-msvc (T2) armv7-unknown-linux-gnueabihf (T2) loongarch64-unknown-linux-gnu (T2) powerpc-unknown-linux-gnu (T2) ``` I have confirmed in https://github.com/rust-lang/stdarch/pull/1873 that the current version of this PR would pass stdarch's CI testsuite. r? `@ghost` try-job: armhf-gnu try-job: arm-android
2025-07-23ci: Add native PowerPC64LE and s390x jobsTrevor Gross-0/+22
We now have access to native runners, so make use of them for these architectures. The existing ppc64le Docker job is kept for now.
2025-07-23bump serde_with. Weird that it works without std feature, butklensy-39/+23
2025-07-23remove unused depsklensy-25/+0
2025-07-23Merge pull request #4479 from RalfJung/ci-win-armRalf Jung-8/+20
CI: add windows-arm runner
2025-07-23Remove Josh code from `miri-script`Jakub Beránek-336/+6
2025-07-23Update josh sync documentationJakub Beránek-13/+10
Now all our Josh subtrees should be using josh-sync.
2025-07-23Init josh-sync config fileJakub Beránek-0/+2
2025-07-23No longer need `alloca`s for consuming `Result<!, i32>` and similarScott McMurray-64/+110
In optimized builds GVN gets rid of these already, but in `opt-level=0` we actually make `alloca`s for this, which particularly impacts `?`-style things that use actually-only-one-variant types like this.
2025-07-23atomicrmw on pointers: move integer-pointer cast hacks into backendRalf Jung-176/+243
2025-07-23properly use caller-side panic location for some GenericArgs methodsRalf Jung-5/+12
2025-07-23CI: add windows-arm runnerRalf Jung-8/+20
2025-07-23std: net: uefi: Add support to query connection dataAyush Singh-15/+81
- Use EFI_TCP4_GET_MODE_DATA to be able to query for ttl, nodelay, peer_addr and socket_addr. - peer_addr is needed for implementation of `accept`. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-07-23Change rename self to parameter use `Self` typeA4-Tacks-29/+48
And add `&self` lifetime support Example === Rename to `this` ```rust struct Foo<T>(T); impl Foo<i32> { fn foo(&'static self$0) {} } ``` Old: ```rust struct Foo<T>(T); impl Foo<i32> { fn foo(this: &Foo) {} } ``` Fixes: ```rust struct Foo<T>(T); impl Foo<i32> { fn foo(this: &'static Self) {} } ```
2025-07-23Auto merge of #143897 - cjgillot:derive-walk, r=petrochenkovbors-1676/+1220
Implement AST visitors using a derive macro. AST visitors are large and error-prone beasts. This PR attempts to write them using a derive macro. The design uses three traits: `Visitor`, `Visitable`, `Walkable`. - `Visitor` is the trait implemented by downstream crates, it lists `visit_stuff` methods, which call `Walkable::walk_ref` by default; - `Walkable` is derived using the macro, the generated `walk_ref` method calls `Visitable::visit` on each component; - `Visitable` is implemented by `common_visitor_and_walkers` macro, to call the proper `Visitor::visit_stuff` method if it exists, to call `Walkable::walk_ref` if there is none. I agree this is quite a lot of spaghetti macros. I'm open to suggestions on how to reduce the amount of boilerplate code. If this PR is accepted, I believe the same design can be used for the HIR visitor.
2025-07-23Merge pull request #20281 from ChayimFriedman2/parse-hrtb-constShoyu Vanilla (Flint)-352/+463
fix: Parse `for<'a> [const]`
2025-07-23[rustdoc] Display unsafe attrs with edition 2024 `unsafe()` wrappers.Predrag Gruevski-14/+46
2025-07-23Don't suggest assoc ty bound on non-angle-bracketed problematic assoc ty bindingLeón Orell Valerian Liehr-5/+36
2025-07-23add links to collectionsgewitternacht-0/+5
2025-07-22rustc_resolve: get rid of unused rustdoc::span_of_fragments_with_expansionbinarycat-13/+4
This function can cause false negatives if used incorrectly (usually "do any of the doc fragments come from a macro" is the wrong question to ask), and thus it is unused.
2025-07-23Don't special-case llvm.* as nounwindAlisa Sireneva-10/+15
Certain LLVM intrinsics, such as `llvm.wasm.throw`, can unwind. Marking them as nounwind causes us to skip cleanup of locals and optimize out `catch_unwind` under inlining or when `llvm.wasm.throw` is used directly by user code. The motivation for forcibly marking llvm.* as nounwind is no longer present: most intrinsics are linked as `extern "C"` or other non-unwinding ABIs, so we won't codegen `invoke` for them anyway.
2025-07-23remove trailing whitespacegewitternacht-1/+1
2025-07-22Unquerify extern_mod_stmt_cnum.Camille GILLOT-6/+6
2025-07-22impl items are never unnamablebinarycat-2/+8
2025-07-22rustdoc: actually never link to unnamable typesbinarycat-7/+18
2025-07-22fix regression testbinarycat-3/+7
2025-07-22rustdoc: never try to link to unnamable typesbinarycat-1/+9
2025-07-22add regression test for RUST-143222binarycat-0/+24
2025-07-23Make lints work with `allow_internal_unstable`Jules Bertholet-0/+1
2025-07-22document assumptions about `Clone` and `Eq` traitsgewitternacht-0/+24
2025-07-22rustdoc: avoid allocating a temp String for aliases in search indexbinarycat-3/+16
2025-07-22Auto merge of #144249 - GuillaumeGomez:asm-tests, r=jieyouxubors-56/+83
Rename `tests/{assembly,codegen}` into `tests/{assembly,codegen}-llvm` and ignore these testsuites if configured backend doesn't match Follow-up of https://github.com/rust-lang/rust/pull/144125. This PR changes `compiletest` so that `asm` tests are only run if they match the current codegen backend. To better reflect it, I renamed the `tests/ui/asm` folder into `tests/ui/asm-llvm`. Like that, we can add new asm tests for other backends if we want without needing to add extra code to `compiletest`. Next step will be to use the new code annotations added in rust-lang/rust#144125 to ignore ui tests failing in cg_gcc until it's fixed on our side. cc `@antoyo` `@oli-obk` r? `@Kobzol`
2025-07-22Merge pull request #1880 from folkertdev/remove-lazy-static-depFolkert de Vries-10/+2
`intrinsic-test`: remove `lazy_static` dependency
2025-07-22Embed auxv files directly into the test binaryJakub Beránek-12/+10
2025-07-22Improve error messages of auxv loadingJakub Beránek-10/+17
2025-07-22Remove licenses from std-detectJakub Beránek-226/+0
They are subsumed by the main repo licenses.
2025-07-22Bless bootstrap testsJakub Beránek-11/+11
2025-07-22Remove `std_detect` from stdarch's CIJakub Beránek-71/+2
2025-07-22Remove `std_detect` from stdarch examplesJakub Beránek-30/+18
2025-07-22Fix warningJakub Beránek-0/+10
2025-07-22Move tests around to appease `tidy`Jakub Beránek-262/+258
2025-07-22remove `lazy_static` dependency from `intrinsic-test`Folkert de Vries-10/+2
we use `std::sync::LazyLock` now.
2025-07-22Update stdarch READMEJakub Beránek-9/+1
2025-07-22Reformat `std_detect`Jakub Beránek-182/+54
2025-07-22Allow platform-specific code in `std_detect`Jakub Beránek-0/+1
2025-07-22Make `std_detect` a direct dependency of `std`Jakub Beránek-16/+7
2025-07-22Move `std_detect` from `library/stdarch` to `library`Jakub Beránek-0/+0
2025-07-22Merge pull request #1881 from folkertdev/s390x-project-simdSayantan Chakraborty-4/+10
work around not being able to project into SIMD values