| Age | Commit message (Collapse) | Author | Lines |
|
Automatic Rustup
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
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
|
|
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
|
|
[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.
|
|
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
|
|
Add `core::arch::breakpoint` and test
Approved in [ACP 491](https://github.com/rust-lang/libs-team/issues/491).
|
|
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.
|
|
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`
|
|
|
|
This pulls in an update that supports `@`-files used to pass arguments
to linkers to fix invocations on Windows that are large.
Closes #133649
|
|
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
|
|
|
|
|
|
Update the definition of `borrowing_sub`
Complementary PR to https://github.com/rust-lang/rust/pull/133674, which only updated `carrying_add`.
|
|
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`
|
|
document -Zrandomize-layout in the unstable book
tracking issue: #106764
fixes #130462
|
|
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.
|
|
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.
|
|
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
|
|
Structurally resolve in `probe_adt`
fixes #132320
r? lcnr
|
|
Lint against Symbol::intern on a string literal
Disabled in tests where this doesn't make much sense
|
|
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.
|
|
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.
|
|
This ensures that it matches the one in `carrying_add`.
|
|
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`
|
|
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
|
|
|
|
|
|
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.)
|
|
|
|
Add const evaluation error UI test.
This closes #78834
|
|
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.
|
|
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?
|
|
Reimplement `~const` trait specialization
Reimplement const specialization. We need this for `PartialEq` constification :)
r? lcnr
|
|
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
|
|
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.
|
|
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`
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|