Return value of coroutine_layout fn changed to Result with LayoutError#140926
Merged
bors merged 1 commit intorust-lang:masterfrom May 18, 2025
Merged
Conversation
Collaborator
Collaborator
RalfJung
reviewed
May 11, 2025
compiler/rustc_middle/src/ty/sty.rs
Outdated
| #[inline] | ||
| fn discriminants( | ||
| self, | ||
| ty: Ty<'tcx>, |
Member
There was a problem hiding this comment.
The doc comment should explain the meaning of the new argument and how it relates to self.
Contributor
There was a problem hiding this comment.
Since it is only used for the Unknown layout error, reconstruct it with Ty::new_coroutine maybe?
9ce3d8a to
ba80d82
Compare
Contributor
|
@bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 13, 2025
…-layout-returns-layout-error, r=oli-obk Return value of coroutine_layout fn changed to Result with LayoutError Continue of rust-lang#140902: `coroutine_layout` fn is now returns `Result` with `LayoutError` to have consistent error with `layout_of_uncached`. `async_drop_coroutine_layout` fn is now return `LayoutError::TooGeneric` in case of not-fully-specialized `async_drop_in_place<T>::{closure}` coroutine.
Collaborator
Collaborator
|
💔 Test failed - checks-actions |
Contributor
|
@bors retry |
fmease
added a commit
to fmease/rust
that referenced
this pull request
May 18, 2025
…ne-layout-returns-layout-error, r=oli-obk Return value of coroutine_layout fn changed to Result with LayoutError Continue of rust-lang#140902: `coroutine_layout` fn is now returns `Result` with `LayoutError` to have consistent error with `layout_of_uncached`. `async_drop_coroutine_layout` fn is now return `LayoutError::TooGeneric` in case of not-fully-specialized `async_drop_in_place<T>::{closure}` coroutine.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 18, 2025
Rollup of 10 pull requests Successful merges: - rust-lang#127013 (Add `f16` formatting and parsing) - rust-lang#138940 (Stabilize the avx512 target features) - rust-lang#140154 (Cygwin support in rustc) - rust-lang#140490 (split `asm!` parsing and validation) - rust-lang#140628 (std: stop using TLS in signal handler) - rust-lang#140746 (name resolution for guard patterns) - rust-lang#140926 (Return value of coroutine_layout fn changed to Result with LayoutError) - rust-lang#141127 (bump windows crate for compiler,bootstrap and tools) - rust-lang#141214 (Miri subtree update) - rust-lang#141218 (gvn: avoid creating overlapping assignments) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 18, 2025
Rollup of 8 pull requests Successful merges: - rust-lang#138940 (Stabilize the avx512 target features) - rust-lang#140490 (split `asm!` parsing and validation) - rust-lang#140628 (std: stop using TLS in signal handler) - rust-lang#140746 (name resolution for guard patterns) - rust-lang#140926 (Return value of coroutine_layout fn changed to Result with LayoutError) - rust-lang#141127 (bump windows crate for compiler,bootstrap and tools) - rust-lang#141214 (Miri subtree update) - rust-lang#141218 (gvn: avoid creating overlapping assignments) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 18, 2025
Rollup merge of rust-lang#140926 - azhogin:azhogin/async-drop-coroutine-layout-returns-layout-error, r=oli-obk Return value of coroutine_layout fn changed to Result with LayoutError Continue of rust-lang#140902: `coroutine_layout` fn is now returns `Result` with `LayoutError` to have consistent error with `layout_of_uncached`. `async_drop_coroutine_layout` fn is now return `LayoutError::TooGeneric` in case of not-fully-specialized `async_drop_in_place<T>::{closure}` coroutine.
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.
Continue of #140902:
coroutine_layoutfn is now returnsResultwithLayoutErrorto have consistent error withlayout_of_uncached.async_drop_coroutine_layoutfn is now returnLayoutError::TooGenericin case of not-fully-specializedasync_drop_in_place<T>::{closure}coroutine.