about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-10-14Rollup merge of #131593 - RalfJung:alloc-no-clone, r=saethlinMatthias Krüger-4/+12
miri: avoid cloning AllocExtra We shouldn't be cloning Miri allocations, so make `AllocExtra::clone` panic instead, and adjust the one case where we *do* clone (the leak check) to avoid cloning. This is in preparation for https://github.com/rust-lang/miri/pull/3966 where I am adding something to `AllocExtra` that cannot (easily) be cloned. r? ``@saethlin``
2024-10-14Rollup merge of #131533 - workingjubilee:update-emscripten-version, r=KobzolMatthias Krüger-2/+2
emscripten: Use the latest emsdk 3.1.68 This should fix our precompiled std being unsound in `std::fs` code. Should resolve #131467 I hope.
2024-10-13Auto merge of #131662 - matthiaskrgr:rollup-r1wkfxw, r=matthiaskrgrbors-12/+32
Rollup of 8 pull requests Successful merges: - #130356 (don't warn about a missing change-id in CI) - #130900 (Do not output () on empty description) - #131066 (Add the Chinese translation entry to the RustByExample build process) - #131067 (Fix std_detect links) - #131644 (Clean up some Miri things in `sys/windows`) - #131646 (sys/unix: add comments for some Miri fallbacks) - #131653 (Remove const trait bound modifier hack) - #131659 (enable `download_ci_llvm` test) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-13Auto merge of #131560 - cuviper:start-1.84, r=cuviperbors-7/+12
Bump to 1.84 https://forge.rust-lang.org/release/process.html#bump-the-stable-version-number-t-6-days-friday-the-week-before r? ghost
2024-10-13Rollup merge of #131659 - onur-ozkan:llvm-test, r=albertlarsan68Matthias Krüger-5/+15
enable `download_ci_llvm` test This was ignored because it caused merge failures on [LLVM update PR](https://github.com/rust-lang/rust/pull/131448). The issue was not checking `is_ci_llvm_available` in the test which is crucial for enabling CI LLVM: https://github.com/rust-lang/rust/blob/2aa26d8a722cf8810b27538c24b93d29324d4ac7/src/bootstrap/src/core/config/config.rs#L2835-L2844
2024-10-13Rollup merge of #131067 - ismailarilik:fix-std-detect-links, r=albertlarsan68Matthias Krüger-0/+4
Fix std_detect links This PR aims to fix this issue: https://github.com/rust-lang/rust/issues/96506 Fixes #96506
2024-10-13Rollup merge of #131066 - Binlogo:build-doc/rbe-add-zh-entry, r=albertlarsan68Matthias Krüger-1/+1
Add the Chinese translation entry to the RustByExample build process Following the guidelines outlined at [https://github.com/rust-lang/rust-by-example/blob/master/TRANSLATING.md](https://github.com/rust-lang/rust-by-example/blob/master/TRANSLATING.md), I am adding a Chinese translation to Rust by Example. You can view the related pull request here: [https://github.com/rust-lang/rust-by-example/pull/1886#issue-2537891289](https://github.com/rust-lang/rust-by-example/pull/1886#issue-2537891289). For similar issues and PRs, see [https://github.com/rust-lang/rust/issues/124641](https://github.com/rust-lang/rust/issues/124641) and [https://github.com/rust-lang/rust/pull/124731](https://github.com/rust-lang/rust/pull/124731).
2024-10-13Rollup merge of #130900 - capickett:empty-description-rust-version, ↵Matthias Krüger-3/+5
r=albertlarsan68 Do not output () on empty description When passing an explicitly empty description string, as explained here https://github.com/rust-lang/rust/blob/master/config.example.toml#L611-L613, my expectation is that the resulting rustc will be compatible with upstream. However, it seems that instead, a `()` is added to the end of the version string, causing the version compatibility check to fail. My proposed fix here would be to instead only print `({description})` if `description` is a non-empty string.
2024-10-13Rollup merge of #130356 - lolbinarycat:ci-no-change-id, r=albertlarsan68Matthias Krüger-3/+7
don't warn about a missing change-id in CI fixes #130352
2024-10-13check `stage0`, `channel` and `version` files for CI rustconur-ozkan-6/+11
These files have important role for compiler builds, so include them in the "if-unchanged" rustc logic. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-13enable `download_ci_llvm` testonur-ozkan-5/+15
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-13Rollup merge of #131642 - jieyouxu:build-fail-check-fail, r=KobzolMatthias Krüger-7/+26
Special case error message for a `build-fail` test that failed check build A `build-fail` test requires that a check build (roughly `--emit=metadata`, no codegen) succeeds but fails later. Previously, if its check build failed, the user will see the error message ``` error: test compilation failed although it shouldn't! ``` which is confusing. Because the test is `build-fail`, we want the test compilation to fail! This error message doesn't account for the difference between a check build and a complete build, so let's special case the error message for a `build-fail` test whose check build failed to instead say ``` error: `build-fail` test is required to pass check build, but check build failed ``` Fixes #130894.
2024-10-13Rollup merge of #131641 - RalfJung:unicode-bitset-static, r=dtolnayMatthias Krüger-4/+4
switch unicode-data bitsets back to 'static' Back in https://github.com/rust-lang/rust/pull/101401, these were changed to `const` to make some functions `const fn`. However, `@dtolnay` was [not happy](https://github.com/rust-lang/rust/issues/101400#issuecomment-1742500968) about this. Meanwhile, `const fn` can access immutable statics like these, so we can change this back. Part of https://github.com/rust-lang/rust/issues/101400.
2024-10-13Rollup merge of #131638 - Zalathar:debuggers, r=jieyouxuMatthias Krüger-274/+290
compiletest: Move debugger setup code out of `lib.rs` These functions contain a few hundred lines of code for dealing with debuggers (for `debuginfo` tests), and don't really belong in the crate root. Moving them out to their own module makes `lib.rs` easier to follow.
2024-10-13Rollup merge of #131614 - jieyouxu:rmake-no-rev, r=KobzolMatthias Krüger-5/+14
Error on trying to use revisions in `run-make` tests Currently, `run-make` tests do not support revisions.
2024-10-13Rollup merge of #131585 - Zalathar:original-line, r=jieyouxuMatthias Krüger-29/+10
compiletest: Remove the one thing that was checking a directive's `original_line` This special handling of `ignore-tidy*` was introduced during the migration to `//`@`` directives (#120881), and has become unnecessary after the subsequent removal of the legacy directive check (#131392).
2024-10-13switch unicode-data back to 'static'Ralf Jung-4/+4
2024-10-13Special case error message for a `build-fail` test that failed check build许杰友 Jieyou Xu (Joe)-7/+26
2024-10-13Move debugger setup code out of `lib.rs`Zalathar-274/+290
2024-10-12Rollup merge of #131358 - onur-ozkan:129528, r=Mark-SimulacrumTrevor Gross-3/+49
force "HEAD" for non-CI and `git_upstream_merge_base` for CI environment When rust-lang/rust is configured as remote, some of the git logic (for tracking changed files) that uses get_closest_merge_commit starts to produce annoying results as the upstream branch becomes outdated quickly (since it isn't updated with git pull). We can rely on HEAD for non-CI environments as we specifically treat bors commits as merge commits, which also exist on upstream. As for CI environments, we should use `git_upstream_merge_base` to correctly track modified files as bors commits may be in `HEAD` but not yet on the upstream remote. This is also an alternative fix for https://github.com/rust-lang/rust/issues/129528 since https://github.com/rust-lang/rust/pull/131331 reverts the previous fix attempts.
2024-10-12Rollup merge of #131334 - heiher:loong-sanitizers, r=Mark-SimulacrumTrevor Gross-0/+5
Enable sanitizers for loongarch64-unknown-* Enable sanitizers for `loongarch64-unknown-linux-{gnu,musl,ohos}` targets.
2024-10-12Rollup merge of #131120 - tgross35:stabilize-const_option, r=RalfJungTrevor Gross-3/+2
Stabilize `const_option` This makes the following API stable in const contexts: ```rust impl<T> Option<T> { pub const fn as_mut(&mut self) -> Option<&mut T>; pub const fn expect(self, msg: &str) -> T; pub const fn unwrap(self) -> T; pub const unsafe fn unwrap_unchecked(self) -> T; pub const fn take(&mut self) -> Option<T>; pub const fn replace(&mut self, value: T) -> Option<T>; } impl<T> Option<&T> { pub const fn copied(self) -> Option<T> where T: Copy; } impl<T> Option<&mut T> { pub const fn copied(self) -> Option<T> where T: Copy; } impl<T, E> Option<Result<T, E>> { pub const fn transpose(self) -> Result<Option<T>, E> } impl<T> Option<Option<T>> { pub const fn flatten(self) -> Option<T>; } ``` The following functions make use of the unstable `const_precise_live_drops` feature: - `expect` - `unwrap` - `unwrap_unchecked` - `transpose` - `flatten` Fixes: <https://github.com/rust-lang/rust/issues/67441>
2024-10-13Error on trying to use revisions in `run-make` tests许杰友 Jieyou Xu (Joe)-5/+14
Currently `run-make` tests do not support revisions.
2024-10-13Remove the one thing that was checking a directive's `original_line`Zalathar-28/+4
2024-10-13Rename `HeaderLine` to `DirectiveLine`Zalathar-8/+13
2024-10-12Stabilize `const_option`Trevor Gross-3/+2
This makes the following API stable in const contexts: impl<T> Option<T> { pub const fn as_mut(&mut self) -> Option<&mut T>; pub const fn expect(self, msg: &str) -> T; pub const fn unwrap(self) -> T; pub const unsafe fn unwrap_unchecked(self) -> T; pub const fn take(&mut self) -> Option<T>; pub const fn replace(&mut self, value: T) -> Option<T>; } impl<T> Option<&T> { pub const fn copied(self) -> Option<T> where T: Copy; } impl<T> Option<&mut T> { pub const fn copied(self) -> Option<T> where T: Copy; } impl<T, E> Option<Result<T, E>> { pub const fn transpose(self) -> Result<Option<T>, E> } impl<T> Option<Option<T>> { pub const fn flatten(self) -> Option<T>; } The following functions make use of the unstable `const_precise_live_drops` feature: - `expect` - `unwrap` - `unwrap_unchecked` - `transpose` - `flatten` Fixes: <https://github.com/rust-lang/rust/issues/67441>
2024-10-12Rollup merge of #131277 - ↵Matthias Krüger-34/+32
ismailarilik:handle-potential-query-instability-lint-for-clippy, r=xFrednet Handle `clippy` cases of `rustc::potential_query_instability` lint This PR removes `#![allow(rustc::potential_query_instability)]` line from [`src/tools/clippy/clippy_lints/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/src/tools/clippy/clippy_lints/src/lib.rs#L30) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors. A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447
2024-10-12Rollup merge of #130965 - onur-ozkan:bootstrap-step-trait-doc, r=Mark-SimulacrumMatthias Krüger-18/+22
make `Step` doc-comments more clear Aiming to improve complicated `Step` documentation. Once we merge this, I will update [this page](https://rustc-dev-guide.rust-lang.org/building/bootstrapping/how-bootstrap-does-it.html?highlight=Step#synopsis-of--step) too.
2024-10-12Auto merge of #131612 - tgross35:rollup-zy3yg4p, r=tgross35bors-12/+29
Rollup of 7 pull requests Successful merges: - #130870 (Add suggestion for removing invalid path sep `::` in fn def) - #130954 (Stabilize const `ptr::write*` and `mem::replace`) - #131233 (std: fix stdout-before-main) - #131590 (yeet some clones) - #131596 (mark InterpResult as must_use) - #131597 (Take a display name for `tool_check_step!`) - #131605 (`LLVMConstInt` only allows integer types) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-12Rollup merge of #131597 - jieyouxu:explicit-check-name, r=KobzolTrevor Gross-12/+29
Take a display name for `tool_check_step!` The tool build step already takes a display name, make the tool check step also take a display name to better represent the tool name. I.e. instead of `src/tools/cargo-miri` becoming `cargomiri`, it now becomes `cargo-miri`. Fixes #131592.
2024-10-12Auto merge of #131448 - DianQK:fixes-131164, r=onur-ozkanbors-0/+2
Update LLVM submodule Fixes (maybe after beta backport) #131164. r? nikic
2024-10-12Update LLVM submoduleDianQK-0/+0
2024-10-12Ignore the `download_ci_llvm` testDianQK-0/+2
2024-10-12Take a display name for `tool_check_step!`许杰友 Jieyou Xu (Joe)-12/+29
2024-10-12miri: avoid cloning AllocExtraRalf Jung-4/+12
2024-10-12add new CI step: "setup upstream remote"onur-ozkan-0/+36
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-12force "HEAD" for non-CI and `git_upstream_merge_base` for CI environmentonur-ozkan-3/+13
When rust-lang/rust is configured as remote, some of the git logic (for tracking changed files) that uses get_closest_merge_commit starts to produce annoying results as the upstream branch becomes outdated quickly (since it isn't updated with git pull). We can rely on HEAD for non-CI environments as we specifically treat bors commits as merge commits, which also exist on upstream. As for CI environments, we should use `git_upstream_merge_base` to correctly track modified files as bors commits may be in `HEAD` but not yet on the upstream remote. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-11Rollup merge of #131576 - Zalathar:tests-tests, r=jieyouxuTrevor Gross-36/+30
Flatten redundant test module `run_make_support::diff::tests::tests` This module is already named `tests`, and is already gated by `#[cfg(test)]`, so there's no need for it to also contain `mod tests`. r? jieyouxu
2024-10-11Rollup merge of #124874 - jedbrown:float-mul-add-fast, r=saethlinTrevor Gross-0/+93
intrinsics fmuladdf{32,64}: expose llvm.fmuladd.* semantics Add intrinsics `fmuladd{f32,f64}`. This computes `(a * b) + c`, to be fused if the code generator determines that (i) the target instruction set has support for a fused operation, and (ii) that the fused operation is more efficient than the equivalent, separate pair of `mul` and `add` instructions. https://llvm.org/docs/LangRef.html#llvm-fmuladd-intrinsic The codegen_cranelift uses the `fma` function from libc, which is a correct implementation, but without the desired performance semantic. I think this requires an update to cranelift to expose a suitable instruction in its IR. I have not tested with codegen_gcc, but it should behave the same way (using `fma` from libc). --- This topic has been discussed a few times on Zulip and was suggested, for example, by `@workingjubilee` in [Effect of fma disabled](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Effect.20of.20fma.20disabled/near/274179331).
2024-10-12Avoid cross-file glob importZalathar-1/+1
2024-10-12Flatten redundant test module `run_make_support::diff::tests::tests`Zalathar-36/+30
2024-10-11Auto merge of #131573 - tgross35:rollup-r7l182a, r=tgross35bors-333/+326
Rollup of 7 pull requests Successful merges: - #130078 (rustdoc-json: change item ID's repr from a string to an int) - #131065 (Port sort-research-rs test suite to Rust stdlib tests) - #131109 (Stabilize `debug_more_non_exhaustive`) - #131287 (stabilize const_result) - #131463 (Stabilise `const_char_encode_utf8`.) - #131543 (coverage: Remove code related to LLVM 17) - #131552 (RustWrapper: adapt for rename of Intrinsic::getDeclaration) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-11Rollup merge of #130078 - its-the-shrimp:rustdoc-types-compress-ids, ↵Trevor Gross-333/+326
r=aDotInTheVoid rustdoc-json: change item ID's repr from a string to an int Following [this discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Optimizing.20the.20.60Id.60.20type.20in.20.60rustdoc-types.60), I've changed the repr of `rustdoc_json_types::Id` from a String to a u32, by adding a `clean::ItemId` interner to `JsonRenderer` r? ``@aDotInTheVoid``
2024-10-11intrinsics.fmuladdf{16,32,64,128}: expose llvm.fmuladd.* semanticsJed Brown-0/+93
Add intrinsics `fmuladd{f16,f32,f64,f128}`. This computes `(a * b) + c`, to be fused if the code generator determines that (i) the target instruction set has support for a fused operation, and (ii) that the fused operation is more efficient than the equivalent, separate pair of `mul` and `add` instructions. https://llvm.org/docs/LangRef.html#llvm-fmuladd-intrinsic MIRI support is included for f32 and f64. The codegen_cranelift uses the `fma` function from libc, which is a correct implementation, but without the desired performance semantic. I think this requires an update to cranelift to expose a suitable instruction in its IR. I have not tested with codegen_gcc, but it should behave the same way (using `fma` from libc).
2024-10-11Auto merge of #131531 - onur-ozkan:move-dummy-commit, r=Kobzolbors-17/+19
move dummy commit logic into x86_64-gnu-llvm-18 Doing the dummy commit logic in a runner that uses CI-LLVM breaks in merge CI. This should be properly fixed by https://github.com/rust-lang/rust/pull/131358 (see the [actual problem](https://github.com/rust-lang/rust/pull/131448#issuecomment-2406516261)). Since we can also fix it by moving the dummy commit into the runner where we use in-tree LLVM, so why not do that as well?
2024-10-11Bump to 1.84Josh Stone-1/+1
2024-10-11Auto merge of #131547 - matthiaskrgr:rollup-ui4p744, r=matthiaskrgrbors-68/+90
Rollup of 6 pull requests Successful merges: - #129079 (Create `_imp__` symbols also when doing ThinLTO) - #131208 (ABI: Pass aggregates by value on AIX) - #131394 (fix(rustdoc): add space between struct fields and their descriptions) - #131519 (Use Default visibility for rustc-generated C symbol declarations) - #131541 (compiletest: Extract auxiliary-crate properties to their own module/struct) - #131542 (next-solver: remove outdated FIXMEs) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-11Rollup merge of #131541 - Zalathar:aux-props, r=jieyouxuMatthias Krüger-68/+87
compiletest: Extract auxiliary-crate properties to their own module/struct This moves the values of the 4 different `aux-*` directives into their own sub-struct. That struct, along with its directive-parsing code, can then be shared by both `TestProps` and `EarlyProps`. The final patch also fixes an oversight in up-to-date checking, by including *all* auxiliary crates in the timestamp, not just ordinary `aux-build` ones.
2024-10-11Rollup merge of #131394 - ↵Matthias Krüger-0/+3
ismailarilik:fix/rustdoc/add-space-between-struct-fields-and-their-descriptions, r=GuillaumeGomez fix(rustdoc): add space between struct fields and their descriptions Stolen from #128541. Fixes #128260. <table> <thead> <tr> <th scope="col">Before</th> <th scope="col">After</th> </tr> </thead> <tbody> <tr> <td scope="row"> <img src="https://github.com/user-attachments/assets/b1d3cb47-77c9-4897-a5d2-2192b11cb8a3" /> </td> <td> <img src="https://github.com/user-attachments/assets/0b104672-d2be-49f4-ac9b-3506526fe2f1" /> </td> </tr> </tbody> </table> <table> <thead> <tr> <th scope="col">Before</th> <th scope="col">After</th> </tr> </thead> <tbody> <tr> <td scope="row"> <img src="https://github.com/user-attachments/assets/650c3e74-a067-492a-9ba3-557f9214f875" /> </td> <td> <img src="https://github.com/user-attachments/assets/413ef9b0-8fca-4e16-978a-7b88d05299dc" /> </td> </tr> </tbody> </table> Unlike original PR, I didn't add space between field headers; I put it between headers and descriptions. So if there are only headers, the space is not changed. Otherwise, I put a space like the space between paragraphs (.75em) which makes sense for me but feel free to adjust it or ask me to do so. r? `@GuillaumeGomez`
2024-10-11Auto merge of #131045 - compiler-errors:remove-unnamed_fields, r=wesleywiserbors-43/+0
Retire the `unnamed_fields` feature for now `#![feature(unnamed_fields)]` was implemented in part in #115131 and #115367, however work on that feature has (afaict) stalled and in the mean time there have been some concerns raised (e.g.[^1][^2]) about whether `unnamed_fields` is worthwhile to have in the language, especially in its current desugaring. Because it represents a compiler implementation burden including a new kind of anonymous ADT and additional complication to field selection, and is quite prone to bugs today, I'm choosing to remove the feature. However, since I'm not one to really write a bunch of words, I'm specifically *not* going to de-RFC this feature. This PR essentially *rolls back* the state of this feature to "RFC accepted but not yet implemented"; however if anyone wants to formally unapprove the RFC from the t-lang side, then please be my guest. I'm just not totally willing to summarize the various language-facing reasons for why this feature is or is not worthwhile, since I'm coming from the compiler side mostly. Fixes #117942 Fixes #121161 Fixes #121263 Fixes #121299 Fixes #121722 Fixes #121799 Fixes #126969 Fixes #131041 Tracking: * https://github.com/rust-lang/rust/issues/49804 [^1]: https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Unnamed.20struct.2Funion.20fields [^2]: https://github.com/rust-lang/rust/issues/49804#issuecomment-1972619108