about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-12-04Merge pull request #4070 from rust-lang/rustup-2024-12-04Ralf Jung-11722/+17596
Automatic Rustup
2024-12-04update lockfileRalf Jung-12/+12
2024-12-04fmtThe Miri Cronjob Bot-1/+5
2024-12-04Merge from rustcThe Miri Cronjob Bot-11709/+17579
2024-12-04clarify simd_relaxed_fma non-determinismRalf Jung-1/+2
2024-12-04Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-12-04Auto merge of #133818 - matthiaskrgr:rollup-iav1wq7, r=matthiaskrgrbors-240/+566
Rollup of 7 pull requests Successful merges: - #132937 (a release operation synchronizes with an acquire operation) - #133681 (improve TagEncoding::Niche docs, sanity check, and UB checks) - #133726 (Add `core::arch::breakpoint` and test) - #133768 (Remove `generic_associated_types_extended` feature gate) - #133811 ([AIX] change AIX default codemodel=large) - #133812 (Update wasm-component-ld to 0.5.11) - #133813 (compiletest: explain that UI tests are expected not to compile by default) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-03Rollup merge of #133813 - clubby789:ui-pass-note, r=jieyouxuMatthias Krüger-4/+7
compiletest: explain that UI tests are expected not to compile by default ``` error: ui test compiled successfully! ``` is not a very useful message for someone new to the test suite, so change the wording and add a note to explain
2024-12-03Rollup merge of #133812 - alexcrichton:update-wasm-component-ld, r=jieyouxuMatthias Krüger-3/+12
Update wasm-component-ld to 0.5.11 This pulls in an update that supports ``@`-files` used to pass arguments to linkers to fix invocations on Windows that are large. Closes #133649
2024-12-03Rollup merge of #133811 - mustartt:change-default-codemodel, r=jieyouxuMatthias Krüger-1/+1
[AIX] change AIX default codemodel=large On AIX, for most libraries, we run out of Table of Contents (TOC) offsets very quickly due to the default 16-bit offset limit. We want the large code model should be used as the default to provide more TOC entries so the end user does not have to specify `-Ccode-model=large` for all their packages. This is even more of an issue with ThinLTO as the ThinLTO globals can very quickly use all available TOC entry. In addition, on AIX, code with different code-model across different compilation units will not cause undefined behavior, so this is safe to do.
2024-12-03Rollup merge of #133768 - compiler-errors:gate, r=lcnr,jackh726Matthias Krüger-124/+300
Remove `generic_associated_types_extended` feature gate This PR retires nightly support for the `generic_associated_types_extended` feature. This feature hasn't received much attention in the last two years or so, and I believe the feature still remains both unsound and ICEy to use. I think that if we were to redesign and reimplement it, we'd want to first figure out how to implement it soundly, but in the mean time I'd prefer to clean this up. r? ``@lcnr`` cc ``@jackh726`` who added this feature gate I think
2024-12-03Rollup merge of #133726 - joshtriplett:breakpoint, r=oli-obkMatthias Krüger-13/+66
Add `core::arch::breakpoint` and test Approved in [ACP 491](https://github.com/rust-lang/libs-team/issues/491).
2024-12-03Rollup merge of #133681 - RalfJung:niches, r=wesleywiserMatthias Krüger-92/+177
improve TagEncoding::Niche docs, sanity check, and UB checks Turns out the `niche_variants` range can actually contain the `untagged_variant`. We should report this as UB in Miri, so this PR implements that. Also rename `partially_check_layout` to `layout_sanity_check` for better consistency with how similar functions are called in other parts of the compiler. Turns out my adjustments to the transmutation logic also fix https://github.com/rust-lang/rust/issues/126267.
2024-12-03Rollup merge of #132937 - xmh0511:master, r=m-ou-seMatthias Krüger-3/+3
a release operation synchronizes with an acquire operation Change: 1. `Calls to park _synchronize-with_ calls to unpark` to `Calls to unpark _synchronize-with_ calls to park` 2. `park synchronizes-with _all_ prior unpark operations` to `_all_ prior unpark operations synchronize-with park`
2024-12-03compiletest: explain that UI tests are expected not to compile by defaultclubby789-4/+7
2024-12-03Update wasm-component-ld to 0.5.11Alex Crichton-3/+12
This pulls in an update that supports `@`-files used to pass arguments to linkers to fix invocations on Windows that are large. Closes #133649
2024-12-03Auto merge of #133803 - matthiaskrgr:rollup-8ag5ncy, r=matthiaskrgrbors-224/+438
Rollup of 9 pull requests Successful merges: - #132612 (Gate async fn trait bound modifier on `async_trait_bounds`) - #133545 (Lint against Symbol::intern on a string literal) - #133558 (Structurally resolve in `probe_adt`) - #133696 (stabilize const_collections_with_hasher and build_hasher_default_const_new) - #133753 (Reduce false positives on some common cases from if-let-rescope lint) - #133762 (stabilize const_{size,align}_of_val) - #133777 (document -Zrandomize-layout in the unstable book) - #133779 (Use correct `hir_id` for array const arg infers) - #133796 (Update the definition of `borrowing_sub`) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-03change aix default codemodel=largeHenry Jiang-1/+1
2024-12-03Remove generic_associated_types_extended feature gateMichael Goulet-124/+300
2024-12-03Rollup merge of #133796 - TDecking:borrowing-sub, r=tgross35Matthias Krüger-3/+24
Update the definition of `borrowing_sub` Complementary PR to https://github.com/rust-lang/rust/pull/133674, which only updated `carrying_add`.
2024-12-03Rollup merge of #133779 - BoxyUwU:array_const_arg_infer_hir_id, ↵Matthias Krüger-5/+22
r=compiler-errors Use correct `hir_id` for array const arg infers Fixes #133771 `self.next_id()` results in the `DefId` for the const argument, created from the hack introduced by #133468, having no `HirId` associated with it. This then results in an ICE in metadata encoding. Fixing this then results in *another* ICE where `encode_defs` was not skipping encoding `type_of` and other queries for `DefId`s when they correspond to a `ConstArgKind::Infer` node. This only reproduces with a library crate as metadata is not encoded for binaries, and apparently we had 0 tests for `generic_arg_infer` for array lengths in a library crate so this was not caught :< cc #133589 `@voidc` r? `@compiler-errors` `@lcnr`
2024-12-03Rollup merge of #133777 - the8472:document-randomize-layout, r=jieyouxuMatthias Krüger-0/+23
document -Zrandomize-layout in the unstable book tracking issue: #106764 fixes #130462
2024-12-03Rollup merge of #133762 - RalfJung:const-size-of-val, r=workingjubileeMatthias Krüger-11/+8
stabilize const_{size,align}_of_val FCP passed [here](https://github.com/rust-lang/rust/issues/46571#issuecomment-2460285288). Fixes https://github.com/rust-lang/rust/issues/46571.
2024-12-03Rollup merge of #133753 - ↵Matthias Krüger-40/+47
dingxiangfei2009:reduce-false-positive-if-let-rescope, r=jieyouxu Reduce false positives on some common cases from if-let-rescope lint r? `@jieyouxu` We would like to identify a very common case in the ecosystem in which we do not need to apply the lint suggestion for the new Edition 2024 `if let` semantics. In this patch we excluded linting from `if let`s in statements and block tail expressions. In these simple cases, new Edition 2024 drop orders are identical to those of Edition 2021 and prior. However, conservatively we should still lint for the other cases, because [this example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2113df5ce78f161d32a1190faf5c7469) shows that the drop order changes are very pronounced, some of which are even sensitive to runtime data.
2024-12-03Rollup merge of #133696 - RalfJung:const-hashmap, r=cuviperMatthias Krüger-6/+53
stabilize const_collections_with_hasher and build_hasher_default_const_new After a lot of preparatory work, finally we can stabilize creating `HashMap` in const context. :) FCP for const_collections_with_hasher passed in https://github.com/rust-lang/rust/issues/102575. Fixes https://github.com/rust-lang/rust/issues/102575. FCP for build_hasher_default_const_new passed in https://github.com/rust-lang/rust/issues/123197. Fixes https://github.com/rust-lang/rust/issues/123197. Cc `@Amanieu` Release notes: https://github.com/rust-lang/rust/issues/133347
2024-12-03Rollup merge of #133558 - compiler-errors:structurally-resolve-probe-adt, r=lcnrMatthias Krüger-16/+20
Structurally resolve in `probe_adt` fixes #132320 r? lcnr
2024-12-03Rollup merge of #133545 - clubby789:symbol-intern-lit, r=jieyouxuMatthias Krüger-37/+94
Lint against Symbol::intern on a string literal Disabled in tests where this doesn't make much sense
2024-12-03Rollup merge of #132612 - compiler-errors:async-trait-bounds, r=lcnrMatthias Krüger-106/+147
Gate async fn trait bound modifier on `async_trait_bounds` This PR moves `async Fn()` trait bounds into a new feature gate: `feature(async_trait_bounds)`. The general vibe is that we will most likely stabilize the `feature(async_closure)` *without* the `async Fn()` trait bound modifier, so we need to gate that separately. We're trying to work on the general vision of `async` trait bound modifier general in: https://github.com/rust-lang/rfcs/pull/3710, however that RFC still needs more time for consensus to converge, and we've decided that the value that users get from calling the bound `async Fn()` is *not really* worth blocking landing async closures in general.
2024-12-03Auto merge of #133792 - lqd:jemallocup, r=Mark-Simulacrumbors-19/+23
switch `jemalloc-sys` back to `tikv-jemalloc-sys`, and update to 0.6.0 Some context: - we used to use jemalloc bindings from https://github.com/gnzlbg/jemallocator, since #55238 - that crate was abandoned, picked up as a fork in https://github.com/tikv/jemallocator, so we switched to that in #83152. - then they were able to publish to the original `jemalloc-sys` bindings crate, and `jemalloc-sys` and `tikv-jemalloc-sys` became the same thing -- so I switched back to the OG crate in #96790 - they're now having publishing problems again: I've been waiting for https://github.com/tikv/jemallocator/pull/96 for the `jemalloc-sys` 0.6.0 update for a few months, but `tikv-jemalloc-sys` is already updated to 0.6.0. A perf run showed some improvements, so this PR switches back to `tikv-jemalloc-sys` to update to 0.6.0.
2024-12-03Update the definition of `borrowing_sub`Tobias Decking-3/+24
This ensures that it matches the one in `carrying_add`.
2024-12-03Auto merge of #104342 - mweber15:add_file_location_to_more_types, r=wesleywiserbors-27/+350
Require `type_map::stub` callers to supply file information This change attaches file information (`DIFile` reference and line number) to struct debug info nodes. Before: ``` ; foo.ll ... !5 = !DIFile(filename: "<unknown>", directory: "") ... !16 = !DICompositeType(tag: DW_TAG_structure_type, name: "MyType", scope: !2, file: !5, size: 32, align: 32, elements: !17, templateParams: !19, identifier: "4cb373851db92e732c4cb5651b886dd0") ... ``` After: ``` ; foo.ll ... !3 = !DIFile(filename: "foo.rs", directory: "/home/matt/src/rust98678", checksumkind: CSK_SHA1, checksum: "bcb9f08512c8f3b8181ef4726012bc6807bc9be4") ... !16 = !DICompositeType(tag: DW_TAG_structure_type, name: "MyType", scope: !2, file: !3, line: 3, size: 32, align: 32, elements: !17, templateParams: !19, identifier: "9e5968c7af39c148acb253912b7f409f") ... ``` Fixes #98678 r? `@wesleywiser`
2024-12-03Auto merge of #133788 - matthiaskrgr:rollup-1p100a8, r=matthiaskrgrbors-168/+535
Rollup of 6 pull requests Successful merges: - #132723 (Unify `sysroot_target_{bin,lib}dir` handling) - #133041 (Print name of env var in `--print=deployment-target`) - #133325 (Reimplement `~const` trait specialization) - #133395 (Add simd_relaxed_fma intrinsic) - #133517 (Deeply normalize when computing implied outlives bounds) - #133785 (Add const evaluation error UI test.) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-03switch jemalloc-sys back to tikv-jemalloc-sys, and update to 0.6.0Rémy Rakic-19/+23
2024-12-03miri: Adapt for `breakpoint` becoming safeJosh Triplett-5/+3
2024-12-02Add `core::arch::breakpoint` and testJosh Triplett-8/+63
Approved in [ACP 491](https://github.com/rust-lang/libs-team/issues/491). Remove the `unsafe` on `core::intrinsics::breakpoint()`, since it's a safe intrinsic to call and has no prerequisites. (Thanks to @zachs18 for figuring out the `bootstrap`/`not(bootstrap)` logic.)
2024-12-03./x miri: fix sysroot buildRalf Jung-4/+8
2024-12-03Rollup merge of #133785 - HypheX:add-ui-test, r=compiler-errorsMatthias Krüger-0/+21
Add const evaluation error UI test. This closes #78834
2024-12-03Rollup merge of #133517 - compiler-errors:deep-norm, r=lcnrMatthias Krüger-29/+88
Deeply normalize when computing implied outlives bounds r? lcnr Unfortunately resolving regions is still slightly scuffed (though in an unrelated way). Specifically, we should be normalizing our param-env outlives when constructing the `OutlivesEnv`; otherwise, these assumptions (https://github.com/rust-lang/rust/blob/dd2837ec5de4301a692e05a7c4475e980af57a57/compiler/rustc_infer/src/infer/outlives/env.rs#L78) are not constructed correctly. Let me know if you want us to track that somewhere.
2024-12-03Rollup merge of #133395 - calebzulawski:simd_relaxed_fma, r=workingjubileeMatthias Krüger-2/+27
Add simd_relaxed_fma intrinsic Adds compiler support for https://github.com/rust-lang/portable-simd/issues/387#issuecomment-2337169786 r? `@workingjubilee` cc `@RalfJung` is this kind of nondeterminism a problem for miri/opsem?
2024-12-03Rollup merge of #133325 - compiler-errors:const-spec, r=lcnr,fee1-deadMatthias Krüger-74/+274
Reimplement `~const` trait specialization Reimplement const specialization. We need this for `PartialEq` constification :) r? lcnr
2024-12-03Rollup merge of #133041 - madsmtm:print-deployment-target-env-var, r=davidtwcoMatthias Krüger-18/+29
Print name of env var in `--print=deployment-target` The deployment target environment variable is OS-specific, and if you're in a place where you're asking `rustc` for the deployment target, you're likely to also wanna know the name of the environment variable. I myself wanted this for some code I'm working on in bootstrap, for example. Behaviour before this PR: ```console $ rustc --print=deployment-target --target=aarch64-apple-darwin deployment_target=11.0 $ rustc --print=deployment-target --target=aarch64-apple-visionos deployment_target=1.0 ``` Behaviour after this PR: ```console $ rustc --print=deployment-target --target=aarch64-apple-darwin MACOSX_DEPLOYMENT_TARGET=11.0 $ rustc --print=deployment-target --target=aarch64-apple-visionos XROS_DEPLOYMENT_TARGET=1.0 ``` My _belief_ is that this option is extremely rarely used in general, and a GitHub search for "rustc print deployment-target" seems to confirm this, it revealed only the following actual pieces of code using this: - https://github.com/PyO3/maturin/blob/b292ef69349f2a56cb8ab1b59fda0be3d3b9f138/src/build_context.rs#L1199-L1220 - https://github.com/rust-lang/cc-rs/blob/daab9244b03e244c4f2511944870d719c443f61f/src/lib.rs#L3422-L3426 `maturin` does `.split('=').last()`, so it will continue to work after this change, but `cc v1.0.84` did `.strip_prefix("deployment_target=")` since [this PR](https://github.com/rust-lang/cc-rs/pull/848), so it would break. That's _probably_ fine though, it was broken in a lot of scenarios anyway, and [got](https://github.com/rust-lang/cc-rs/pull/901) [reverted](https://github.com/rust-lang/cc-rs/pull/943) in `v1.0.85`. So while this is _technically_ a breaking change, I really doubt that anyone is going to observe it, so it's probably fine. ``@BlackHoleFox`` wdyt? ``@rustbot`` label O-apple r? compiler
2024-12-03Rollup merge of #132723 - jieyouxu:sysroot-dance-dance-revolution, r=onur-ozkanMatthias Krüger-45/+96
Unify `sysroot_target_{bin,lib}dir` handling Follow-up to https://github.com/rust-lang/rust/pull/131405#discussion_r1826558962 where `sysroot_target_bindir` had to do some dancing because the sysroot ensure logic embedded in `sysroot_target_libdir` returned `$sysroot/$relative_lib/rustlib/$target/lib` and not the `rustlib` parent `$sysroot/$relative_lib/rustlib/`. This PR pulls out the sysroot ensure logic into a helper, and return `$sysroot/$relative_lib/rustlib/` instead so `sysroot_target_bindir` doesn't have to do parent traversal from the path returned from `sysroot_target_libdir`, and also make them easier to follow in that they are now clearly closely related based on the common target sysroot ensure logic.
2024-12-03Auto merge of #133321 - compiler-errors:const-checker, r=wesleywiserbors-574/+121
Get rid of HIR const checker As far as I can tell, the HIR const checker was implemented in https://github.com/rust-lang/rust/pull/66170 because we were not able to issue useful const error messages in the MIR const checker. This seems to have changed in the last 5 years, probably due to work like #90532. I've tweaked the diagnostics slightly and think the error messages have gotten *better* in fact. Thus I think the HIR const checker has reached the end of its usefulness, and we can retire it. cc `@RalfJung`
2024-12-02Add ui test for const evaluation fail when type is too big.Xelph-0/+21
2024-12-02Fix tests when using MinGWMatt Weber-4/+4
2024-12-03Auto merge of #133770 - GuillaumeGomez:rollup-l62iyyx, r=GuillaumeGomezbors-418/+1863
Rollup of 10 pull requests Successful merges: - #131713 (Stabilize `const_maybe_uninit_write`) - #133535 (show forbidden_lint_groups in future-compat reports) - #133610 (Move `Const::{from_anon_const,try_from_lit}` to hir_ty_lowering) - #133701 (Use c"lit" for CStrings without unwrap) - #133704 (fix ICE when promoted has layout size overflow) - #133705 (add "profiler" and "optimized-compiler-builtins" option coverage for ci-rustc) - #133710 (Reducing `target_feature` check-cfg merge conflicts) - #133732 (Fix `-Zdump-mir-dataflow`) - #133746 (Change `AttrArgs::Eq` to a struct variant) - #133763 (Fix `f16::midpoint` const feature gate) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-03Use correct `hir_id` for array const arg infersBoxy-5/+22
2024-12-03document -Zrandomize-layout in the unstable bookThe 8472-0/+23
2024-12-02Structurally resolve in probe_adtMichael Goulet-16/+20
2024-12-02Assert that obligations are empty before deeply normalizingMichael Goulet-25/+37