about summary refs log tree commit diff
path: root/compiler
AgeCommit message (Collapse)AuthorLines
2025-04-28Rollup merge of #140402 - lcnr:normalizes-to-certainty-yes, r=compiler-errorsChris Denton-32/+66
only return nested goals for `Certainty::Yes` Ambiguous `NormalizesTo` goals can otherwise repeatedly add the same nested goals to the parent. r? ```@compiler-errors```
2025-04-28Rollup merge of #140323 - tgross35:cfg-unstable-float, r=UrgauChris Denton-27/+192
Implement the internal feature `cfg_target_has_reliable_f16_f128` Support for `f16` and `f128` is varied across targets, backends, and backend versions. Eventually we would like to reach a point where all backends support these approximately equally, but until then we have to work around some of these nuances of support being observable. Introduce the `cfg_target_has_reliable_f16_f128` internal feature, which provides the following new configuration gates: * `cfg(target_has_reliable_f16)` * `cfg(target_has_reliable_f16_math)` * `cfg(target_has_reliable_f128)` * `cfg(target_has_reliable_f128_math)` `reliable_f16` and `reliable_f128` indicate that basic arithmetic for the type works correctly. The `_math` versions indicate that anything relying on `libm` works correctly, since sometimes this hits a separate class of codegen bugs. These options match configuration set by the build script at [1]. The logic for LLVM support is duplicated as-is from the same script. There are a few possible updates that will come as a follow up. The config introduced here is not planned to ever become stable, it is only intended to replace the build scripts for `std` tests and `compiler-builtins` that don't have any way to configure based on the codegen backend. MCP: https://github.com/rust-lang/compiler-team/issues/866 Closes: https://github.com/rust-lang/compiler-team/issues/866 [1]: https://github.com/rust-lang/rust/blob/555e1d0386f024a8359645c3217f4b3eae9be042/library/std/build.rs#L84-L186 --- The second commit makes use of this config to replace `cfg_{f16,f128}{,_math}` in `library/`. I omitted providing a `cfg(bootstrap)` configuration to keep things simpler since the next beta branch is in two weeks. try-job: aarch64-gnu try-job: i686-msvc-1 try-job: test-various try-job: x86_64-gnu try-job: x86_64-msvc-ext2
2025-04-28Rollup merge of #140302 - compiler-errors:inline_asm-bug, r=lcnrChris Denton-72/+66
Move inline asm check to typeck, properly handle aliases Pull `InlineAsmCtxt` down to `rustc_hir_typeck`, and instead of using things like `Ty::is_copy`, use the `InferCtxt`-aware methods. To fix https://github.com/rust-lang/trait-system-refactor-initiative/issues/189, we also add a `try_structurally_resolve_*` call to `expr_ty`. r? lcnr
2025-04-28Rollup merge of #140276 - compiler-errors:typeof-less-eagerly, r=lcnrChris Denton-0/+6
Do not compute type_of for impl item if impl where clauses are unsatisfied Consider the following code: ```rust trait Foo { fn call(self) -> impl Send; } trait Nested {} impl<T> Foo for T where T: Nested, { fn call(self) -> impl Sized { NotSatisfied.call() } } struct NotSatisfied; impl Foo for NotSatisfied { fn call(self) -> impl Sized { todo!() } } ``` In `impl Foo for NotSatisfied`, we need to prove that the RPITIT is well formed. This requires proving the item bound `<NotSatisfied as Foo>::RPITIT: Send`. Normalizing `<NotSatisfied as Foo>::RPITIT: Send` assembles two impl candidates, via the `NotSatisfied` impl and the blanket `T` impl. We end up computing the `type_of` for the blanket impl even if `NotSatisfied: Nested` where clause does not hold. This type_of query ends up needing to prove that its own `impl Sized` RPIT satisfies `Send`, which ends up needing to compute the hidden type of the RPIT, which is equal to the return type of `NotSatisfied.call()`. That ends up in a query cycle, since we subsequently try normalizing that return type via the blanket impl again! In the old solver, we don't end up computing the `type_of` an impl candidate if its where clauses don't hold, since this select call would fail before confirming the projection candidate: https://github.com/rust-lang/rust/blob/d7ea436a02d5de4033fcf7fd4eb8ed965d0f574c/compiler/rustc_trait_selection/src/traits/project.rs#L882 This PR makes the new solver more consistent with the old solver by adding a call to `try_evaluate_added_goals` after regstering the impl predicates, which causes us to bail before computing the `type_of` for impls if the impl definitely doesn't apply. r? lcnr Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/185
2025-04-28Rollup merge of #140022 - dianne:box-deref-pats, r=NadrierilChris Denton-31/+64
allow deref patterns to move out of boxes This adds a case to lower deref patterns on boxes using a built-in deref instead of a `Deref::deref` or `DerefMut::deref_mut` call: if `deref!(inner): Box<T>` is matching on place `place`, the inner pattern `inner` now matches on `*place` rather than a temporary. No longer needing to call a method also means it won't borrow the scrutinee in match arms. This allows for bindings in `inner` to move out of `*place`. For comparison with box patterns, this uses the same MIR lowering but different THIR. Consequently, deref patterns on boxes are treated the same as any other deref patterns in match exhaustiveness analysis. Box patterns can't quite be implemented in terms of deref patterns until exhaustiveness checking for deref patterns is implemented (I'll open a PR for exhaustiveness soon!). Tracking issue: #87121 r? ``@Nadrieril``
2025-04-28Rollup merge of #139656 - scottmcm:stabilize-slice-as-chunks, r=dtolnayChris Denton-1/+0
Stabilize `slice_as_chunks` library feature ~~Draft as this needs #139163 to land first.~~ FCP: https://github.com/rust-lang/rust/issues/74985#issuecomment-2769963395 Methods being stabilized are: ```rust impl [T] { const fn as_chunks<const N: usize>(&self) -> (&[[T; N]], &[T]); const fn as_rchunks<const N: usize>(&self) -> (&[T], &[[T; N]]); const unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]]; const fn as_chunks_mut<const N: usize>(&mut self) -> (&mut [[T; N]], &mut [T]); const fn as_rchunks_mut<const N: usize>(&mut self) -> (&mut [T], &mut [[T; N]]); const unsafe fn as_chunks_unchecked_mut<const N: usize>(&mut self) -> &mut [[T; N]]; } ``` ~~(FCP's not done quite yet, but will in another day if I'm counting right.)~~ FCP Complete: https://github.com/rust-lang/rust/issues/74985#issuecomment-2797951535
2025-04-28Rollup merge of #139308 - Shourya742:2025-03-29-add-autodiff-inline, r=ZuseZ4Chris Denton-2/+122
add autodiff inline closes: #138920 r? ```@ZuseZ4``` try-job: dist-aarch64-linux
2025-04-28Auto merge of #140388 - GuillaumeGomez:rollup-aj9o3ch, r=GuillaumeGomezbors-519/+566
Rollup of 7 pull requests Successful merges: - #140056 (Fix a wrong error message in 2024 edition) - #140220 (Fix detection of main function if there are expressions around it) - #140249 (Remove `weak` alias terminology) - #140316 (Introduce `BoxMarker` to improve pretty-printing correctness) - #140347 (ci: clean more disk space in codebuild) - #140349 (ci: use aws codebuild for the `dist-x86_64-linux` job) - #140379 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-28Do not compute type_of for impl item if impl where clauses are unsatisfiedMichael Goulet-0/+6
2025-04-28reviewlcnr-19/+29
2025-04-28only return nested goals for `Certainty::Yes`lcnr-18/+42
2025-04-28remove noinline attribute and add alwaysinline after AD passbit-aloo-10/+81
2025-04-28Auto merge of #123948 - azhogin:azhogin/async-drop, r=oli-obkbors-1406/+2750
Async drop codegen Async drop implementation using templated coroutine for async drop glue generation. Scopes changes to generate `async_drop_in_place()` awaits, when async droppable objects are out-of-scope in async context. Implementation details: https://github.com/azhogin/posts/blob/main/async-drop-impl.md New fields in Drop terminator (drop & async_fut). Processing in codegen/miri must validate that those fields are empty (in full version async Drop terminator will be expanded at StateTransform pass or reverted to sync version). Changes in terminator visiting to consider possible new successor (drop field). ResumedAfterDrop messages for panic when coroutine is resumed after it is started to be async drop'ed. Lang item for generated coroutine for async function async_drop_in_place. `async fn async_drop_in_place<T>()::{{closure0}}`. Scopes processing for generate async drop preparations. Async drop is a hidden Yield, so potentially async drops require the same dropline preparation as for Yield terminators. Processing in StateTransform: async drops are expanded into yield-point. Generation of async drop of coroutine itself added. Shims for AsyncDropGlueCtorShim, AsyncDropGlue and FutureDropPoll. ```rust #[lang = "async_drop"] pub trait AsyncDrop { #[allow(async_fn_in_trait)] async fn drop(self: Pin<&mut Self>); } impl Drop for Foo { fn drop(&mut self) { println!("Foo::drop({})", self.my_resource_handle); } } impl AsyncDrop for Foo { async fn drop(self: Pin<&mut Self>) { println!("Foo::async drop({})", self.my_resource_handle); } } ``` First async drop glue implementation re-worked to use the same drop elaboration code as for sync drop. `async_drop_in_place` changed to be `async fn`. So both `async_drop_in_place` ctor and produced coroutine have their lang items (`AsyncDropInPlace`/`AsyncDropInPlacePoll`) and shim instances (`AsyncDropGlueCtorShim`/`AsyncDropGlue`). ``` pub async unsafe fn async_drop_in_place<T: ?Sized>(_to_drop: *mut T) { } ``` AsyncDropGlue shim generation uses `elaborate_drops::elaborate_drop` to produce drop ladder (in the similar way as for sync drop glue) and then `coroutine::StateTransform` to convert function into coroutine poll. AsyncDropGlue coroutine's layout can't be calculated for generic T, it requires known final dropee type to be generated (in StateTransform). So, `templated coroutine` was introduced here (`templated_coroutine_layout(...)` etc). Such approach overrides the first implementation using mixing language-level futures in https://github.com/rust-lang/rust/pull/121801.
2025-04-28Rollup merge of #140316 - nnethercote:BoxMarker, r=dtolnayGuillaume Gomez-417/+464
Introduce `BoxMarker` to improve pretty-printing correctness Box opening/closing is really easy to get wrong in the pretty-printers. This PR makes it much harder to get wrong. r? `@Urgau`
2025-04-28Rollup merge of #140249 - BoxyUwU:remove_weak_alias_terminology, r=oli-obkGuillaume Gomez-100/+100
Remove `weak` alias terminology I find the "weak" alias terminology to be quite confusing. It implies the existence of "strong" aliases (which do not exist) and I'm not really sure what about weak aliases is "weak". I much prefer "free alias" as the term. I think it's much more obvious what it means as "free function" is a well defined term that already exists in rust. It's also a little confusing given "weak alias" is already a term in linker/codegen spaces which are part of the compiler too. Though I'm not particularly worried about that as it's usually very obvious if you're talking about the type system or not lol. I'm also currently trying to write documentation about aliases and it's somewhat awkward/confusing to be talking about *weak* aliases, when I'm not really sure what the basis for that as the term actually *is*. I would also be happy to just find out there's a nice meaning behind calling them "weak" aliases :-) r? `@oli-obk` maybe we want a types MCP to decide on a specific naming here? or maybe we think its just too late to go back on this naming decision ^^'
2025-04-28Rollup merge of #140056 - yuk1ty:fix-static-mut-error-message, r=jieyouxuGuillaume Gomez-2/+2
Fix a wrong error message in 2024 edition Fixes https://github.com/rust-lang/rust/issues/139952
2025-04-28AsyncDrop implementation using shim codegen of ↵Andrew Zhogin-1380/+2712
async_drop_in_place::{closure}, scoped async drop added.
2025-04-28Auto merge of #123239 - Urgau:dangerous_implicit_autorefs, ↵bors-0/+188
r=jdonszelmann,traviscross Implement a lint for implicit autoref of raw pointer dereference - take 2 *[t-lang nomination comment](https://github.com/rust-lang/rust/pull/123239#issuecomment-2727551097)* This PR aims at implementing a lint for implicit autoref of raw pointer dereference, it is based on #103735 with suggestion and improvements from https://github.com/rust-lang/rust/pull/103735#issuecomment-1370420305. The goal is to catch cases like this, where the user probably doesn't realise it just created a reference. ```rust pub struct Test { data: [u8], } pub fn test_len(t: *const Test) -> usize { unsafe { (*t).data.len() } // this calls <[T]>::len(&self) } ``` Since #103735 already went 2 times through T-lang, where they T-lang ended-up asking for a more restricted version (which is what this PR does), I would prefer this PR to be reviewed first before re-nominating it for T-lang. ---- Compared to the PR it is as based on, this PR adds 3 restrictions on the outer most expression, which must either be: 1. A deref followed by any non-deref place projection (that intermediate deref will typically be auto-inserted) 2. A method call annotated with `#[rustc_no_implicit_refs]`. 3. A deref followed by a `addr_of!` or `addr_of_mut!`. See bottom of post for details. There are several points that are not 100% clear to me when implementing the modifications: - ~~"4. Any number of automatically inserted deref/derefmut calls." I as never able to trigger this. Am I missing something?~~ Fixed - Are "index" and "field" enough? ---- cc `@JakobDegen` `@WaffleLapkin` r? `@RalfJung` try-job: dist-various-1 try-job: dist-various-2
2025-04-28Inline and remove three pretty-printer methods.Nicholas Nethercote-67/+37
They all have a single call site, aren't that big, and removing them avoids having to pass some `BoxMarker`s.
2025-04-28Use `PrintState::head` in `PrintState::block_to_string`.Nicholas Nethercote-4/+1
2025-04-28Introduce `BoxMarker` to pretty-printing.Nicholas Nethercote-371/+451
The pretty-printers open and close "boxes" of text a lot. The open and close operations must be matched. The matching is currently all implicit and very easy to get wrong. (#140280 and #140246 are two recent pretty-printing fixes that both involved unclosed boxes.) This commit introduces `BoxMarker`, a marker type that represents an open box. It makes box opening/closing explicit, which makes it much easier to understand and harder to get wrong. The commit also removes many comments are on `end` calls saying things like "end outer head-block", "Close the outer-box". These demonstrate how confusing the implicit approach was, but aren't necessary any more.
2025-04-28Rollup merge of #140345 - DaniPopes:get-def-path, r=UrgauChris Denton-1/+4
Avoid re-interning in `LateContext::get_def_path` The def path printer in `get_def_path` essentially calls `Symbol::intern(&symbol.to_string())` for simple symbols in a path. This accounts for ~30% of the runtime of get_def_path. We can avoid this by simply appending the symbol directly when available.
2025-04-27Move inline_asm to typeck, properly handle aliasesMichael Goulet-72/+66
2025-04-27Implement the internal feature `cfg_target_has_reliable_f16_f128`Trevor Gross-27/+192
Support for `f16` and `f128` is varied across targets, backends, and backend versions. Eventually we would like to reach a point where all backends support these approximately equally, but until then we have to work around some of these nuances of support being observable. Introduce the `cfg_target_has_reliable_f16_f128` internal feature, which provides the following new configuration gates: * `cfg(target_has_reliable_f16)` * `cfg(target_has_reliable_f16_math)` * `cfg(target_has_reliable_f128)` * `cfg(target_has_reliable_f128_math)` `reliable_f16` and `reliable_f128` indicate that basic arithmetic for the type works correctly. The `_math` versions indicate that anything relying on `libm` works correctly, since sometimes this hits a separate class of codegen bugs. These options match configuration set by the build script at [1]. The logic for LLVM support is duplicated as-is from the same script. There are a few possible updates that will come as a follow up. The config introduced here is not planned to ever become stable, it is only intended to replace the build scripts for `std` tests and `compiler-builtins` that don't have any way to configure based on the codegen backend. MCP: https://github.com/rust-lang/compiler-team/issues/866 Closes: https://github.com/rust-lang/compiler-team/issues/866 [1]: https://github.com/rust-lang/rust/blob/555e1d0386f024a8359645c3217f4b3eae9be042/library/std/build.rs#L84-L186
2025-04-28dropee_emit_retag function separated in drop glue buildAndrew Zhogin-26/+38
2025-04-27Rollup merge of #140358 - Zoxc:variance-cycle, r=oli-obkMatthias Krüger-12/+20
Use `search_for_cycle_permutation` to look for `variances_of` This uses `search_for_cycle_permutation` to look for `variances_of` in case `variances_of` is not the first query in the cycle. This may fix https://github.com/rust-lang/rust/issues/124423 and https://github.com/rust-lang/rust/issues/127971. r? `@oli-obk`
2025-04-27Rollup merge of #140348 - ehuss:lint-docs-edition, r=compiler-errorsMatthias Krüger-4/+4
Update lint-docs to default to Rust 2024 This updates the lint-docs tool to default to the 2024 edition. The lint docs are supposed to illustrate the code with the latest edition, and I just forgot to update this in https://github.com/rust-lang/rust/pull/133349. Some docs needed to add the `edition` attribute since they were assuming a particular edition, but were missing the explicit annotation. This also includes a commit to simplify the edition handling in lint-docs.
2025-04-27Rollup merge of #140280 - nnethercote:improve-if-else-printing, r=UrgauMatthias Krüger-12/+21
Improve if/else pretty printing AST/HIR pretty printing of if/else is currently pretty bad. This PR improves it a lot. r? `@Nadrieril`
2025-04-27Rollup merge of #140246 - nnethercote:fix-never-pattern-printing, r=NadrierilMatthias Krüger-0/+1
Fix never pattern printing It's currently broken, but there's an easy fix. r? `@Nadrieril`
2025-04-27Rollup merge of #140346 - petrochenkov:cleanhyg, r=compiler-errorsMatthias Krüger-118/+54
rustc_span: Some hygiene cleanups Mostly enabled by #139241 and #139281.
2025-04-27Rollup merge of #140339 - petrochenkov:capanew, r=lqdMatthias Krüger-9/+8
session: Cleanup `CanonicalizedPath::new` It wants an owned path, so pass an owned path.
2025-04-27Use `search_for_cycle_permutation` to look for `variances_of`John Kåre Alsaker-12/+20
2025-04-27Auto merge of #139646 - lcnr:default-is-fully-concrete, r=BoxyUwUbors-0/+33
check types of const param defaults fixes #139643 by checking that the type of a const parameter default matches the type of the parameter as long as both types are fully concrete r? `@BoxyUwU`
2025-04-26Auto merge of #140288 - Zalathar:new-executor, r=jieyouxubors-1/+1
compiletest: Re-land using the new non-libtest executor by default This PR re-lands #139998, which had the misfortune of triggering download-rustc in its CI jobs, so we didn't get proper test metrics for comparison with the old implementation. So that was PR was reverted in #140233, with the intention of re-landing it alongside a dummy compiler change to inhibit download-rustc. --- Original PR description for #139998: >The new executor was implemented in #139660, but required a manual opt-in. This PR activates the new executor by default, but leaves the old libtest-based executor in place (temporarily) to make reverting easier if something unexpectedly goes horribly wrong. > >Currently the new executor can be explicitly disabled by passing the `-N` flag to compiletest (e.g. `./x test ui -- -N`), but eventually that flag will be removed, alongside the removal of the libtest dependency. The flag is mostly there to make manual comparative testing easier if something does go wrong. > >As before, there *should* be no user-visible difference between the old executor and the new executor. --- r? jieyouxu
2025-04-26Update lint-docs to default to Rust 2024Eric Huss-4/+4
This updates the lint-docs tool to default to the 2024 edition. The lint docs are supposed to illustrate the code with the latest edition, and I just forgot to update this in https://github.com/rust-lang/rust/pull/133349. Some docs needed to add the `edition` attribute since they were assuming a particular edition, but were missing the explicit annotation.
2025-04-26hygiene: Use `IndexVec` for syntax context decode cacheVadim Petrochenkov-9/+4
2025-04-26Avoid re-interning in `LateContext::get_def_path`DaniPopes-1/+4
The def path printer in `get_def_path` essentially calls `Symbol::intern(&symbol.to_string())` for simple symbols in a path. This accounts for ~30% of the runtime of get_def_path. We can avoid this by simply appending the symbol directly when available.
2025-04-26hygiene: Misc cleanupsVadim Petrochenkov-82/+46
Inline some functions used once. Use `impl Trait` more. Tweak some comments.
2025-04-26hygiene: Remove decode placeholdersVadim Petrochenkov-34/+11
They are no longer necessary after #139281
2025-04-26session: Cleanup `CanonicalizedPath::new`Vadim Petrochenkov-9/+8
It wants an owned path, so pass an owned path
2025-04-26Rollup merge of #140320 - lcnr:wf-use-term, r=compiler-errorsMatthias Krüger-174/+189
replace `GenericArg` with `Term` where applicable r? types
2025-04-26Rollup merge of #140318 - compiler-errors:specialized-async-fn-kind-err, ↵Matthias Krüger-31/+10
r=fee1-dead Simply try to unpeel AsyncFnKindHelper goal in `emit_specialized_closure_kind_error` Tweak the handling of `AsyncFnKindHelper` goals in `emit_specialized_closure_kind_error` to not be so special-casey, and just try to unpeel one or two layers of obligation causes to get to their underlying `AsyncFn*` goal. Fixes https://github.com/rust-lang/rust/issues/140292
2025-04-26Rollup merge of #140317 - mejrs:check_on_uni, r=compiler-errorsMatthias Krüger-1/+0
Remove redundant check We still check for `rustc_on_unimplemented` on implementations, but this functionality was removed in https://github.com/rust-lang/rust/pull/139091, since then it always returns `Ok` when called with a non-trait defid. https://github.com/rust-lang/rust/blob/b4c8b0c3f0533bb342a4873ff59bdad3883ab8e3/compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs#L557-L564
2025-04-26Rollup merge of #140215 - joshlf:transmutability-char-nonzero, r=jswrennMatthias Krüger-46/+213
transmutability: Support char, NonZeroXxx Note that `NonZero` support is not wired up, as the author encountered bugs while attempting this. A future commit will wire up `NonZero` support. r? ````@jswrenn````
2025-04-26Fix error message for static references or mutable referencesyuk1ty-2/+2
2025-04-26Auto merge of #140324 - matthiaskrgr:rollup-jlzvdre, r=matthiaskrgrbors-36/+201
Rollup of 8 pull requests Successful merges: - #139865 (Stabilize proc_macro::Span::{start,end,line,column}.) - #140086 (If creating a temporary directory fails with permission denied then retry with backoff) - #140216 (Document that "extern blocks must be unsafe" in Rust 2024) - #140253 (Add XtensaAsmPrinter) - #140272 (Improve error message for `||` (or) in let chains) - #140305 (Track per-obligation recursion depth only if there is inference in the new solver) - #140306 (handle specialization in the new trait solver) - #140308 (stall generator witness obligations: add regression test) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-26Rollup merge of #140306 - lcnr:specialization-new, r=compiler-errorsMatthias Krüger-14/+117
handle specialization in the new trait solver fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/187 also fixes the regression in `plonky2_field` from https://github.com/rust-lang/trait-system-refactor-initiative/issues/188 cc https://github.com/rust-lang/rust/pull/111994 r? ```@compiler-errors```
2025-04-26Rollup merge of #140305 - compiler-errors:coerce-loop, r=lcnrMatthias Krüger-8/+15
Track per-obligation recursion depth only if there is inference in the new solver Track how many times an obligation has been processed in the fulfillment context by reusing its recursion depth, and only overflow if a singular (root) goal hits the limit. This also fixes a (probably theoretical at this point) problem where we don't detect pseudo-hangs across `select_where_possible` calls. fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/186 r? lcnr
2025-04-26Rollup merge of #140272 - Kivooeo:new-fix-four, r=est31Matthias Krüger-4/+17
Improve error message for `||` (or) in let chains **Description** This PR improves the error message when using `||` in an if let chain expression, addressing #140263. **Changes** 1. Creates a dedicated error message specifically for `||` usage in let chains 2. Points the primary span directly at the `||` operator 3. Removes confusing secondary notes about "let statements" and unsupported contexts 5. Adds UI tests verifying the new error message and valid cases **Before** ```rust error: expected expression, found let statement --> src/main.rs:2:8 | 2 | if let true = true || false {} | ^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of if and while expressions note: || operators are not supported in let chain expressions --> src/main.rs:2:24 | 2 | if let true = true || false {} | ``` **After** ```rust error: `||` operators are not supported in let chain conditions --> src/main.rs:2:24 | 2 | if let true = true || false {} | ^^ ``` **Implementation details** 1. Added new `OrInLetChain` diagnostic in errors.rs 2. Modified `CondChecker` in expr.rs to prioritize the `||` error 3. Updated fluent message definitions to use clearer wording **Related issue** Fixes #140263 cc ```@ehuss``` (issue author)
2025-04-26Rollup merge of #140253 - SergioGasquez:feat/xtensa-asm-printer, r=cuviperMatthias Krüger-0/+1
Add XtensaAsmPrinter See https://github.com/rust-lang/rust/pull/133601. The PR was closed because it required LLVM 19 in CI added with (https://github.com/rust-lang/rust/commit/12167d7064597993355e41d3a8c20654bccaf0be)