Repository navigation
Conversation
Currently they just wrap the unsafe versions. Will need to be rewritten eventually. Issue rust-lang#1022
This can't be done with bare functions. Issue rust-lang#1022
Delete the rest of the old, unused spawn functions. Issue rust-lang#1022
The meaning of various fn incantations is going to get temporarily confusing
This reverts commit 1b0f1f0.
fn is a proper subtype of block now
I don't know if this is the right thing to do, but it works and it lets 'fn' always mean proto_bare
Now they are both just proto_shared and proto_shared takes an argument indicating that it is sugared as 'lambda'
fn@ is intended to be caputring but isn't implemented.
Had to ignore some task failure tests due to the current implementation of spawn which guarantees that there's always something in the spawned task that needs to be unwound. Fixed some win-specific build problems.
Contributor
|
I still think Apart from that, I think this works well. |
Contributor
Author
|
I've put off the final decision on lambda a while longer. Thanks for the review marijnh. |
U007D
pushed a commit
to U007D/rust-mos
that referenced
this pull request
Aug 21, 2026
1051: Move ra_ide_api unit tests r=matklad a=detrumi Closes rust-lang#1048 Co-authored-by: Wilco Kusee <wilcokusee@gmail.com>
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.
This series does a lot of things to implement bare functions. It results in some things being more complicated and/or less pleasant to use, so I'd like to provide an opportunity to review it before I push.
At the end of the series,
fnis a bare function,fn@is a shared function andlambdais sugar forfn@.385e595 introduces a spawn function that takes a bare function. This commit is still using a temporary
fn#syntax for bare functions. Spawning now looks like788be70 creates a subtyping relationship between function types, where
fn# < fn@ < block. This is the only subtyping in the language besidesmutable?, and the implementation is currently trivial as I've left the implementation of bare functions the same as closures.7c81430 makes the big conversion from the existing
fnto bare functions and shared closures. In the process many higher-order functions had to be changed to takefn@and many generic functions had to be instantiated with bind (to convert them to afn@).TODO:
fn@/lambdaandfn&/block, whether we want one or both forms.