Rustc pull update#1672
Open
Kobzol wants to merge 1972 commits into
Open
Conversation
misc coercion cleanups and handle safety correctly r? lcnr ### "remove normalize call" Fixes rust-lang/rust#132765 If the normalization fails we would sometimes get a `TypeError` containing inference variables created inside of the probe used by coercion. These would then get leaked out causing ICEs in diagnostics logic ### "leak check and lub for closure<->closure coerce-lubs of same defids" Fixes rust-lang/trait-system-refactor-initiative#233 ```rust fn peculiar() -> impl Fn(u8) -> u8 { return |x| x + 1 } ``` the `|x| x + 1` expr has a type of `Closure(?31t)` which we wind up inferring the RPIT to. The `CoerceMany` `ret_coercion` for the whole `peculiar` typeck has an expected type of `RPIT` (unnormalized). When we type check the `return |x| x + 1` expr we go from the never type to `Closure(?31t)` which then participates in the `ret_coercion` giving us a `coerce-lub(RPIT, Closure(?31t))`. Normalizing `RPIT` gives us some `Closure(?50t)` where `?31t` and `?50t` have been unified with `?31t` as the root var. `resolve_vars_if_possible` doesn't resolve infer vars to their roots so these wind up with different structural identities so the fast path doesn't apply and we fall back to coercing to a `fn` ptr. cc rust-lang/rust#147193 which also fixes this New solver probably just gets more inference variables here because canonicalization + generally different approach to normalization of opaques. Idk :3 ### FCP worthy stuffy there are some other FCP worthy things but they're in my FCP comment which also contains some analysis of the breaking nature of the previously listed changes in this PR: rust-lang/rust#148602 (comment)
…o filtering Reading the manifest doesn't work when running in the context of the rust build system.
Subtree sync for rustc_codegen_cranelift The main highlights this time are a Cranelift update and adding actual support for `-Cdebuginfo=line-tables-only` rather than treating it the same as `-Cdebuginfo=full`. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
Using a defaulted `CodegenBackend` method that querying for zstd support should automatically print a safe value of `false` on any backend that doesn't specifically indicate the presence or absence of zstd.
Remove -Zoom=panic There are major questions remaining about the reentrancy that this allows. It doesn't have any users on github outside of a single project that uses it in a panic=abort project to show backtraces. It can still be emulated through `#[alloc_error_handler]` or `set_alloc_error_hook` depending on if you use the standard library or not. And finally it makes it harder to do various improvements to the allocator shim. With this PR the sole remaining symbol in the allocator shim that is not effectively emulating weak symbols is the symbol that prevents skipping the allocator shim on stable even when it would otherwise be empty because libstd + `#[global_allocator]` is used. Closes rust-lang/rust#43596 Fixes rust-lang/rust#126683
Rollup of 10 pull requests Successful merges: - rust-lang/rust#147725 (Remove -Zoom=panic) - rust-lang/rust#148294 (callconv: fix mips64 aggregate argument passing for C FFI) - rust-lang/rust#148491 ( Correctly provide suggestions when encountering `async fn` with a `dyn Trait` return type) - rust-lang/rust#149458 (Run clippy on cg_gcc in CI) - rust-lang/rust#149679 (Restrict spe_acc to PowerPC SPE targets) - rust-lang/rust#149781 (Don't suggest wrapping attr in unsafe if it may come from proc macro) - rust-lang/rust#149795 (Use `let`...`else` instead of `match foo { ... _ => return };` and `if let ... else return` in std) - rust-lang/rust#149816 (Make typo in field and name suggestions verbose) - rust-lang/rust#149824 (Add a regression test for issue 145748) - rust-lang/rust#149826 (compiletest: tidy up `adb_path`/`adb_test_dir` handling) r? `@ghost` `@rustbot` modify labels: rollup
Make `--print=backend-has-zstd` work by default on any backend Using a defaulted `CodegenBackend` method that querying for zstd support should automatically print a safe value of `false` on any backend that doesn't specifically indicate the presence or absence of zstd. This should fix the compiletest failures reported in rust-lang/rust#149666 (comment), which can occur when LLVM is not the default codegen backend.
Rollup of 7 pull requests Successful merges: - rust-lang/rust#148052 (Stabilize `const_mul_add`) - rust-lang/rust#149386 (Display funding link in the github overview) - rust-lang/rust#149489 (Experimentally add *heterogeneous* `try` blocks) - rust-lang/rust#149764 (Make `--print=backend-has-zstd` work by default on any backend) - rust-lang/rust#149838 (Build auxiliary in pretty tests) - rust-lang/rust#149839 (Use `PointeeSized` bound for `TrivialClone` impls) - rust-lang/rust#149846 (Statically require links to an issue or the edition guide for all FCWs) r? `@ghost` `@rustbot` modify labels: rollup
Remove uses of `cfg({any()/all()})`
~~This implements the followup warning suggested in rust-lang/rfcs#3695
~~Lint against an empty `cfg(any/all)`, suggest the boolean literal equivalents.~~
rust-lang/rust#149791 (comment)
Tracking issue: rust-lang/rust#131204
Rollup of 7 pull requests Successful merges: - rust-lang/rust#149655 (bootstrap: add rustc-dev install target) - rust-lang/rust#149789 (Cleanup in the attribute parsers) - rust-lang/rust#149791 (Remove uses of `cfg({any()/all()})`) - rust-lang/rust#149792 (Suggest `cfg(false)` instead of `cfg(FALSE)`) - rust-lang/rust#149883 (add regression test for `proc_macro` error subdiagnostics) - rust-lang/rust#149884 (Clippy subtree update) - rust-lang/rust#149896 (Add myself(makai410) to the review rotation) r? `@ghost` `@rustbot` modify labels: rollup
…let ... else return`
Use `let...else` instead of `match foo { ... _ => return };` and `if let ... else return`
Rollup of 10 pull requests Successful merges: - rust-lang/rust#145278 (Update `rustc_codegen_gcc` rotate operation document) - rust-lang/rust#148837 (Use `let...else` instead of `match foo { ... _ => return };` and `if let ... else return`) - rust-lang/rust#149177 (Add proper suggestion for associated function with unknown field) - rust-lang/rust#149843 (Inherit attributes in delegation) - rust-lang/rust#149860 (Fix: Prevent macro-expanded extern crates from shadowing extern arguments) - rust-lang/rust#149874 (Weak for Arc pointer is marked as DynSend/DynSync) - rust-lang/rust#149903 (Remove unused code in `cfg_old`) - rust-lang/rust#149911 (bootstrap: Don't pass an unused `--color` to compiletest) - rust-lang/rust#149916 (Add a sanity check in case of any duplicate nodes) - rust-lang/rust#149924 (`declare_lint_pass` for `INLINE_ALWAYS_MISMATCHING_TARGET_FEATURES`) r? `@ghost` `@rustbot` modify labels: rollup
Overhaul filename handling for cross-compiler consistency This PR overhauls the way we handle filenames in the compiler and `rmeta` in order to achieve achieve cross-compiler consistency (ie. having the same path no matter if the filename was created in the current compiler session or is coming from `rmeta`). This is required as some parts of the compiler rely on consistent paths for the soundness of generated code (see rust-lang/rust#148328). In order to achieved consistency multiple steps are being taken by this PR: - by making `RealFileName` immutable - by only having `SourceMap::to_real_filename` create `RealFileName` - currently `RealFileName` can be created from any `Path` and are remapped afterwards, which creates consistency issue - by also making `RealFileName` holds it's working directory, embeddable name and the remapped scopes - this removes the need for a `Session`, to know the current(!) scopes and cwd, which is invalid as they may not be equal to the scopes used when creating the filename In order for `SourceMap::to_real_filename` to know which scopes to apply `FilePathMapping` now takes the current remapping scopes to apply, which makes `FileNameDisplayPreference` and company useless and are removed. This PR is split-up in multiple commits (unfortunately not atomic), but should help review the changes. Unblocks rust-lang/rust#147611 Fixes rust-lang/rust#148328
…szelmann Simplify how inline asm handles `MaybeUninit` This is just better, but this is also allows it to handle changes from rust-lang/rust#149614 (i.e. `ManuallyDrop` containing `MaybeDangle`).
Rollup of 13 pull requests Successful merges: - rust-lang/rust#148756 (Warn on codegen attributes on required trait methods) - rust-lang/rust#148790 (Add new Tier-3 target: riscv64im-unknown-none-elf) - rust-lang/rust#149271 (feat: dlopen Enzyme) - rust-lang/rust#149459 (std: sys: fs: uefi: Implement set_times and set_perm) - rust-lang/rust#149771 (bootstrap readme: make easy to read when editor wrapping is not enabled) - rust-lang/rust#149856 (Provide an extended framework for type visit, for use in rust-analyzer) - rust-lang/rust#149950 (Simplify how inline asm handles `MaybeUninit`) - rust-lang/rust#150014 (Metadata loader cleanups) - rust-lang/rust#150021 (document that mpmc channels deliver an item to (at most) one receiver) - rust-lang/rust#150029 (Update books) - rust-lang/rust#150031 (assert impossible branch is impossible) - rust-lang/rust#150034 (do not add `I-prioritize` when `F-*` labels are present) - rust-lang/rust#150036 (Use the embeddable filename for coverage artifacts) r? `@ghost` `@rustbot` modify labels: rollup
Subtree sync for rustc_codegen_cranelift Nothing too exciting since the last sync. r? ``@ghost`` ``@rustbot`` label +A-codegen +A-cranelift +T-compiler
…uwer Rollup of 12 pull requests Successful merges: - rust-lang/rust#145933 (Expand `str_as_str` to more types) - rust-lang/rust#148849 (Set -Cpanic=abort in windows-msvc stack protector tests) - rust-lang/rust#149925 (`cfg_select!`: parse unused branches) - rust-lang/rust#149952 (Suggest struct pattern when destructuring Range with .. syntax) - rust-lang/rust#150022 (Generate macro expansion for rust compiler crates docs) - rust-lang/rust#150024 (Support recursive delegation) - rust-lang/rust#150048 (std_detect: AArch64 Darwin: expose SME F16F16 and B16B16 features) - rust-lang/rust#150083 (tests/run-make-cargo/same-crate-name-and-macro-name: New regression test) - rust-lang/rust#150102 (Fixed ICE for EII with multiple defaults due to duplicate definition in nameres) - rust-lang/rust#150124 (unstable.rs: fix typos in comments (implementatble -> implementable)) - rust-lang/rust#150125 (Port `#[rustc_lint_opt_deny_field_access]` to attribute parser) - rust-lang/rust#150126 (Subtree sync for rustc_codegen_cranelift) Failed merges: - rust-lang/rust#150127 (Port `#[rustc_lint_untracked_query_information]` and `#[rustc_lint_diagnostics]` to using attribute parsers) r? `@ghost` `@rustbot` modify labels: rollup
All usages of `memory_index` start by calling `invert_bijective_mapping`, so storing the inverted mapping directly saves some work and simplifies the code.
…ubilee layout: Store inverse memory index in `FieldsShape::Arbitrary` All usages of `memory_index` start by calling `invert_bijective_mapping`, so storing the inverted mapping directly saves some work and simplifies the code.
Rollup of 6 pull requests Successful merges: - rust-lang/rust#149633 (Enable `outline-atomics` by default on AArch64 FreeBSD) - rust-lang/rust#149788 (Move shared offload globals and define per-kernel globals once) - rust-lang/rust#149989 (Improve filenames encoding and misc) - rust-lang/rust#150012 (rustc_target: Add `efiapi` ABI support for LoongArch) - rust-lang/rust#150116 (layout: Store inverse memory index in `FieldsShape::Arbitrary`) - rust-lang/rust#150159 (Split eii macro expansion code) r? `@ghost` `@rustbot` modify labels: rollup
…,saethlin Replace Rvalue::NullaryOp by a variant in mir::Operand. Based on rust-lang/rust#148151 This PR fully removes the MIR `Rvalue::NullaryOp`. After rust-lang/rust#148151, it was only useful for runtime checks like `ub_checks`, `contract_checks` and `overflow_checks`. These are "runtime" checks, boolean constants that may only be `true` in codegen. It depends on a rustc flag passed to codegen, so we need to represent those flags cross-crate. This PR replaces those runtime checks by special variants in MIR `ConstValue`. This allows code that expects constants to manipulate those as such, even if we may not always be able to evaluate them to actual scalars.
add `extern "tail"` calling convention Maps to LLVM's `tailcc` and hence inherits all its problems. This calling convention at least compiles on: - `x86_64` - `aarch64` It also compiles on - `s390x` - `loongarch64` But I've been told by target maintainers that this is kind of unintentional, and it's not tested in LLVM. For most backends LLVM does not have support and fails loudly.
Rollup of 25 pull requests Successful merges: - rust-lang/rust#157251 (`rust-analyzer` subtree update) - rust-lang/rust#157533 (Subtree sync for rustc_codegen_cranelift) - rust-lang/rust#154742 (Add APIs for case folding to the standard library) - rust-lang/rust#155144 (mir_build: Add an extra intermediate step in MIR building for patterns ) - rust-lang/rust#156222 (Stabilize `Result::map_or_default` and `Option::map_or_default`) - rust-lang/rust#157016 (add `extern "tail"` calling convention) - rust-lang/rust#157264 (diagnostics: Fix ICE building a trait ref in method suggestions) - rust-lang/rust#157386 (Parse deprecated note links separately in rustc_resolve) - rust-lang/rust#157483 (fix windows-gnu TLS leak) - rust-lang/rust#157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows) - rust-lang/rust#157509 (remove solaris implementation for File::lock, it has the wrong semantics) - rust-lang/rust#157521 (Rename `SyncView::{as_pin => as_pin_ref}`) - rust-lang/rust#156136 (Move tests box) - rust-lang/rust#156573 (Add unwinder_private_data_size for wasm64 target) - rust-lang/rust#156783 (docs: make `Rc::into_raw` clickable in `Rc::increment_strong_count` doc) - rust-lang/rust#156840 (Stabilize `PathBuf::into_string`) - rust-lang/rust#156936 (Remove FIXME about impl PinCoerceUnsized for UnsafePinned<T>) - rust-lang/rust#157365 (Revert "LLVM 23: Run AssignGUIDPass in some places") - rust-lang/rust#157380 (clarify compiler_fence (and fence) docs) - rust-lang/rust#157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`) - rust-lang/rust#157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N)) - rust-lang/rust#157494 (Convert `QueryRegionConstraint` into a struct) - rust-lang/rust#157526 (std tests: skip a slow test on Miri) - rust-lang/rust#157531 (ci: bump x86_64-gnu base image to 26.04) - rust-lang/rust#157556 (Add `BTree::append()` change to 1.96.0 relnotes) Failed merges: - rust-lang/rust#155527 (Replace printables table with `unicode_data.rs` tables)
This is an UnordMap internally. Iteration order for the work product map should not matter aside from the place it is serialized where sorting by WorkProductId is sufficient.
Couple of work product cleanups Part of rust-lang/compiler-team#908
Rollup of 25 pull requests Successful merges: - rust-lang/rust#157447 (Move cross crate tests into the appropriate folder) - rust-lang/rust#145108 (Resolver: Batched Import Resolution) - rust-lang/rust#156119 (Further optimize `SliceIndex<str>` impl for `Range<usize>`) - rust-lang/rust#157224 (Manually unroll loop in `str::floor_char_boundary`) - rust-lang/rust#157289 (Add infallible primitive type lookups to template arg resolver) - rust-lang/rust#157540 (Cleanup and optimize `render_impls`) - rust-lang/rust#157444 (Couple of work product cleanups) - rust-lang/rust#157543 (Reorganize `tests/ui/issues` [5/N]) - rust-lang/rust#153513 (Syntactically reject equality predicates) - rust-lang/rust#155797 (LineWriter: cap write_vectored newline scan to avoid quadratic write_all_vectored) - rust-lang/rust#156155 (macros: report unbound metavariables directly) - rust-lang/rust#156188 (riscv: promote d, e, and f target_features to CfgStableToggleUnstable) - rust-lang/rust#156666 (Clarify meaning of ranges in pointer offset docs) - rust-lang/rust#157078 (Document equivalence of `highest_one` and `ilog2` methods on integers) - rust-lang/rust#157129 (ci: update download-artifact action to v8) - rust-lang/rust#157169 (triagebot: Update messages to direct changes to appropriate repositories) - rust-lang/rust#157323 (Document Repeat::last panic behavior) - rust-lang/rust#157370 (Clarify MaybeUninit::zeroed padding docs) - rust-lang/rust#157399 (Silence llbc's output by default to prevent rustc's linker output warning) - rust-lang/rust#157500 (Improve documentation of `align_of` and `Alignment`.) - rust-lang/rust#157545 (Suggest using comma to separate valid attribute list items) - rust-lang/rust#157559 (chore: Update annotate-snippets to 0.12.16) - rust-lang/rust#157560 (In `copy_nonoverlapping`, use `mul nuw nsw` to compute the byte size) - rust-lang/rust#157580 (Importing suggestion reported twice when reporting privacy error) - rust-lang/rust#157581 (Test fixup)
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@029c9e1 Filtered ref: rust-lang/stdarch@b914e70 Upstream diff: rust-lang/rust@045b177...029c9e1 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
The operation is a no-op, so we skip it.
remove LLVM `va_end` calls tracking issue: rust-lang/rust#44930 The operation is a no-op, so we skip it.
Rollup of 13 pull requests Successful merges: - rust-lang/rust#152544 (Stabilize `int_format_into` feature) - rust-lang/rust#157507 (fixed: differentiation between uninitialized and possibly uninitialized) - rust-lang/rust#155750 (Document that `ManuallyDrop`'s `Box` interaction has been fixed) - rust-lang/rust#157075 (lower edition requirements for some async-closure test helpers) - rust-lang/rust#157627 (remove LLVM `va_end` calls) - rust-lang/rust#157660 (normalize instead of evaluating type const patterns) - rust-lang/rust#157692 (Don't emit `unused_parens` suggestion for proc-macro-synthesized parens around bounds) - rust-lang/rust#157908 (fix binding const argument to assoc type suggestion) - rust-lang/rust#157915 (scalable vecs size incl. num vecs + no sret for scalable vecs) - rust-lang/rust#157916 (Avoid ICE on invalid crate-level cfg_attr predicates) - rust-lang/rust#157919 (mention in the `extern "tail"` error that it's supported on x86) - rust-lang/rust#157920 (mailmap: add mu001999) - rust-lang/rust#157924 (Update books)
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@8e15021 Filtered ref: rust-lang/stdarch@bc28f3f Upstream diff: rust-lang/rust@029c9e1...8e15021 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
They tend to have similar handling -- e.g., they should be the only input to the `mir_shims` query -- so it's cleaner to group them together. This will also make potential future refactorings easier, such as only carrying `GenericArgsRef` for instances that actually use it (e.g., `Item`) but not others (e.g., `CloneShim`). Many of the shim variants still have `Shim` at the end of their names. To make the refactoring easier and keep the diff clean, I will trim those suffixes off in the next commit.
Extract all instance shim variants into new `ShimKind` enum They tend to have similar handling -- e.g., they should be the only input to the `mir_shims` query -- so it's cleaner to group them together. This will also make potential future refactorings easier, such as only carrying `GenericArgsRef` for instances that actually use it (e.g., `Item`) but not others (e.g., `CloneShim`). cc https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/moving.20ty.3A.3AInstance.2Eargs.20into.20ty.3A.3AInstanceKind.20variants r? @oli-obk
Rollup of 35 pull requests Successful merges: - rust-lang/rust#158315 (`rust-analyzer` subtree update) - rust-lang/rust#158336 (Stop excluding `stdarch` test crates from `rust-src`) - rust-lang/rust#155739 (Add temporary scope to assert_eq and assert_ne) - rust-lang/rust#156885 (Fix misattributed type inference error span for index expressions) - rust-lang/rust#157271 (simplify some `proc_macro` things) - rust-lang/rust#157419 (move rustc_type_ir Term things to term_kind.rs) - rust-lang/rust#157883 (Remove strict invariant node_type on hir_type during ty privacy visit) - rust-lang/rust#157921 (trait solver: Resolve region vars in max universe) - rust-lang/rust#157960 (delegation: add support for infers in generics) - rust-lang/rust#157983 (Lift the same-signature restriction for `extern "tail"`) - rust-lang/rust#158053 (Optimize network address parser) - rust-lang/rust#158105 (Extract all instance shim variants into new `ShimKind` enum) - rust-lang/rust#158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` ) - rust-lang/rust#158279 (Follow goto and drop when linting unreachable code) - rust-lang/rust#157527 (Move derive tests into their dedicated folder) - rust-lang/rust#157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`) - rust-lang/rust#157939 (Reorganize `tests/ui/issues` [8/N]) - rust-lang/rust#157946 (Make `char::is_private_use` and `char::is_assigned` unstably public) - rust-lang/rust#158003 (Reorganize `tests/ui/issues` [9/N]) - rust-lang/rust#158020 (Update mingw-w64 C toolchain) - rust-lang/rust#158039 (c-variadic: test that we use equality up to free lifetimes) - rust-lang/rust#158060 (Reorganize `tests/ui/issues` [10/N]) - rust-lang/rust#158222 (format: ignore println newline in foreign format hints) - rust-lang/rust#158223 (Move target checking for #[lang] to the attribute parser) - rust-lang/rust#158252 (Use `cfg_select` in `std::os`) - rust-lang/rust#158263 (Only load the feature list once in the entire resolver) - rust-lang/rust#158267 (FromUtf8Error::into_utf8_lossy better example and suggest use) - rust-lang/rust#158272 (Reorganize `tests/ui/issues` [13/N]) - rust-lang/rust#158274 (triagebot: Stop pinging myself) - rust-lang/rust#158282 (slice_split_once: bounds check optimization note) - rust-lang/rust#158300 (Improve unknown crate_type diagnostic suggestions) - rust-lang/rust#158304 (mailmap: update mu001999) - rust-lang/rust#158309 (Update `rustc-literal-escaper` version to `0.0.8`) - rust-lang/rust#158314 (Fix incorrect unsafe debug assertion in unchecked_div_exact) - rust-lang/rust#158326 (Add `io::ErrorKind::TooManyOpenFiles`)
Add rigid alias marker This PR adds a rigidness marker to `TyKind::Alias` and `ConstKind::Unevaluated`. It's used to skip renormalization of rigid aliases. The tracking issue for this is rust-lang/rust#155345. The difficulty is that rigid aliases are only valid in their own `TypingEnv` so we need to force them back to non-rigid when entering another `TypingEnv`, either because a change to the `ParamEnv` or because we enter another `TypingMode`. Changes to the `ParamEnv` currently only happen by moving into a new context. We now make sure that `EarlyBinder` new contains any rigid aliases, this way we have to normalize all aliases contained in it after instantiating. Changes to the `TypingMode` are rare, and have to be manually handled. --- The main changes in this PR are as follows: - we add `enum IsRigid { Yes, No }` as a field to `TyKind::Alias` and `ConstKind::Unevaluated`. It is always `No` with the old solver, this makes some of the code less nice than it will be with the old solver removed. - if we keep an alias as rigid when proving `Projection` goals we equate the expected term with that alias with `IsRigid::Yes` - `EarlyBinder::bind` now takes the `tcx` and eagerly sets all `IsRigid` to `No`, this is necessary as moving aliases into a different `TypingEnv` may cause them to no longer be rigid - `EarlyBinder::bind_iter` asserts that there are no rigid aliases instead of replacing them - type relations and generalization always structurally recurse into rigid aliases - a lot of places in the new solver can ICE when matching on `TyKind::Alias` with `IsRigid::No` --- There's a lot of future work here: - coherence don't actually rely on lazy norm :< - remove eq_structurally_relating_aliases, have a special type folder for canonical responses - yeet `AliasRelate`, lazily replace non-rigid aliases with infer var + projection goal - `ParamEnv` normalization hack to incorrectly mark things as rigid - eagerly normalize when adding stuff to the fulfillment ctxt :> - change `TypeOutlives` goal handling to only expect rigid aliases - properly expect `IsRigid::Yes`in region handling (or `yes_if_next_solver`) - probably change `EarlyBinder::bind` to also assert that there are no rigid aliases and manually replacing rigid aliases before then where necessary --- This PR also adds a flag `-Zrenormalize-rigid-aliases` to test whether we properly handle typing mode change. Currently only `tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-4.rs` fails this check. r? lcnr
Add arg splat experiment initial tuple impl ### Description This PR is part of the argument splatting lang experiment, and FFI overloading / C++ interop project goals: - rust-lang/rust#153629 - https://rust-lang.github.io/rust-project-goals/2026/overloading-for-ffi.html - https://rust-lang.github.io/rust-project-goals/2025h2/interop-problem-map.html Example code using existing unstable features: - https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=f42a3754a63a3d9365670e57257053d5 Discussion of implementation strategy: - [#t-lang > On overloading @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/On.20overloading/near/579590336) The PR is the initial implementation of the feature: - `splat` incomplete feature gate - `#[splat]` attribute on function arguments - Splatted function argument TypeInfo - `#[splat]` function parameter check at THIR level - splatted MIR lowering (as tupled arguments) - feature gate and UI tests for item type filtering, non-splattable arguments, splattable tuples, generics, and the "overloading at home" example - about half the diff (1100 lines) is tests and test output Once this PR merges, we can add further functionality, then test it out in interop tools. ### Perf Impact We expect a 0.1% regression on 5 primary and 0.2% regression on 4 secondary benchmarks in this PR, based on [this perf run](rust-lang/rust#158251 (comment)). We tried a number of different ways to improve perf. Limiting splat to the 255th or lower argument is a simple hack that gives good perf, and is good enough for an experiment. This PR series already has significant perf wins in rust-lang/rust#155223 - [0.3% perf improvement across 45 primary benchmarks](rust-lang/rust#155223 (comment)). We're spending a small amount of that perf for the new feature in this PR. ### Out of Scope for this PR - Change codegen to de-tuple caller and callee - Better diagnostics - Full support for splatted function pointer arguments
…uwer Rollup of 15 pull requests Successful merges: - rust-lang/rust#153697 (Add arg splat experiment initial tuple impl) - rust-lang/rust#158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children) - rust-lang/rust#158438 (Use rigidness marker in fast_reject) - rust-lang/rust#157127 (cg_LLVM: Stop needing an alloca for volatile loads) - rust-lang/rust#158376 (Suggest `>=` for `=>` typo in closure and call argument positions) - rust-lang/rust#158185 (perf: Make stable_crate_ids reads lock-free after crate loading) - rust-lang/rust#158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` ) - rust-lang/rust#158355 (Fixup the refactoring errors in rust-lang/rust#156246) - rust-lang/rust#158361 (Move `check_ffi_pure` into the attribute parser) - rust-lang/rust#158382 (Add safety section for SliceIndex::get_unchecked(mut)) - rust-lang/rust#158399 (std: truncate thread names on NetBSD) - rust-lang/rust#158418 (Eliminate double length check in `Vec::into_array`) - rust-lang/rust#158430 (Guard clone suggestion against empty obligation errors) - rust-lang/rust#158446 (Update Enzyme submodule) - rust-lang/rust#158448 (Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()`)
LLVM updated the name, the old one still works but stdarch is now using the new one
…rtdev stdarch subtree update Subtree update of `stdarch` to rust-lang/stdarch@62d5595. Created using https://github.com/rust-lang/josh-sync. r? @ghost
Rollup of 15 pull requests Successful merges: - rust-lang/rust#158497 (stdarch subtree update) - rust-lang/rust#152225 (Add supertrait item shadowing for type-level path resolution) - rust-lang/rust#158194 (Adds RmetaLinkCache a per-link cache that uses path as the key of dec…) - rust-lang/rust#158466 (rustdoc: show impl Trait<Box<Local>> for Foreign, etc on Local's docs) - rust-lang/rust#158501 (miri subtree update) - rust-lang/rust#153097 (Expand `OptionFlatten`'s iterator methods) - rust-lang/rust#157614 (Move tests drop) - rust-lang/rust#157996 (perf: drop the full-crate AST walk in check_unused) - rust-lang/rust#158163 (Fix too-short variance slice in `variances_of` cycle recovery) - rust-lang/rust#158233 (Allow the unstable attribute on foreign type) - rust-lang/rust#158433 (Fix inconsistent safety requirement in VecDeque::nonoverlapping_ranges) - rust-lang/rust#158464 (Reorganize `tests/ui/issues` [15/N]) - rust-lang/rust#158470 (Upgrade `jsonsocck` and `jsondoclint` to edition 2024.) - rust-lang/rust#158485 (Reorganize `tests/ui/issues` [16/N]) - rust-lang/rust#158488 (Upgrade `rustdoc-json-types` to 2024 edition.)
To emphasize that just because you see a `Scalar(I32)` that doesn't really tell you anything about the alignment it has -- one should be looking at the type (well, the place) for that. No actual layout or behaviour changes in *this* PR.
Rename `align` to `default_align` on `Scalar` and `Primitive` To emphasize that just because you see a `Scalar(I32)` that doesn't really tell you anything about the alignment it has -- one should be looking at the type (well, the place) for that. (The `size` method doesn't really have that problem -- i32 is always 4 bytes, no matter the context -- so is left untouched.) No actual layout or behaviour changes in *this* PR. Just the rename and some comments. r? @workingjubilee
Rollup of 6 pull requests Successful merges: - rust-lang/rust#157718 (Do not increase depth when evaluating nested goals of `NormalizesTo`) - rust-lang/rust#158449 (QNX target renaming) - rust-lang/rust#158483 (signed strict division: just use normal division) - rust-lang/rust#158516 ( Deduplicate codegen backends in bootstrap config) - rust-lang/rust#158542 (Rename `align` to `default_align` on `Scalar` and `Primitive`) - rust-lang/rust#158636 (linkchecker: upgrade to `html5ever v0.39`)
This updates the rust-version file to c397dae808f70caebab1fc4e11b3edf7e59f58c7.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@c397dae Filtered ref: rust-lang/rustc_codegen_cranelift@c311018 Upstream diff: rust-lang/rust@...c397dae This merge was created using https://github.com/rust-lang/josh-sync.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trying to migrate this repository to Josh (again), since we are now finally using the new Josh version with empty merge commit pruning.
Merge ref 'c397dae808f7' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: rust-lang/rust@c397dae
Filtered ref: c311018
Upstream diff: rust-lang/rust@...c397dae
This merge was created using https://github.com/rust-lang/josh-sync.