Open
Conversation
Collaborator
|
|
This comment has been minimized.
This comment has been minimized.
1d08de5 to
92b334a
Compare
oli-obk
reviewed
Mar 14, 2026
library/coretests/tests/array.rs
Outdated
| #[test] | ||
| fn extra_const_array_ops() { | ||
| let x: [u8; 4] = | ||
| const { std::array::from_fn(const |i| i + 4).map(const |x| x * 2).map(const |x| x as _) }; |
Contributor
There was a problem hiding this comment.
Also add a test with upvars (both trivial ones and ones with const Drop impls
Contributor
There was a problem hiding this comment.
And a UI test that fails if an upvar is not const Destruct
92b334a to
9a21f8d
Compare
This comment has been minimized.
This comment has been minimized.
oli-obk
reviewed
Mar 14, 2026
tests/ui/traits/const-traits/const-closure-with-indestructible-indestructible.rs
Show resolved
Hide resolved
9a21f8d to
cf2876e
Compare
This comment has been minimized.
This comment has been minimized.
d2537d2 to
20dfeff
Compare
This comment has been minimized.
This comment has been minimized.
20dfeff to
29a13cc
Compare
This comment has been minimized.
This comment has been minimized.
29a13cc to
bc613f8
Compare
This comment has been minimized.
This comment has been minimized.
bc613f8 to
5c1e5d5
Compare
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
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.
makes closures const destruct where their upvars are. i think this makes sense
and is how this should be implemented.
r? @oli-obk