-
Notifications
You must be signed in to change notification settings - Fork 1.6k
refactor: remove OnceLock
#9992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
JonasKruckenberg
wants to merge
7
commits into
bytecodealliance:main
Choose a base branch
from
JonasKruckenberg:jonas/static-machine-env
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+536
−209
Draft
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
34933d0
feat: make `MachineEnv`s static and remove `OnceLock`s
JonasKruckenberg 416a5f6
Update abi.rs
JonasKruckenberg 9a1ef9c
fixes
JonasKruckenberg 846297f
Update abi.rs
JonasKruckenberg beeb370
fixes
JonasKruckenberg 080f09d
Update Cargo.toml
JonasKruckenberg e091faf
Update Cargo.toml
JonasKruckenberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fixes
- Loading branch information
commit beeb370e6ce066c8165816d4f94f788f90e115ba
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you say more here -- I'm not that familiar with the current state of constification of everything; is there some feature this is waiting on to stabilize or...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, the feature that would be waiting for is const associated functions in traits (therefore allowing
From::fromto be const) but that afaik is in "never type land". I can remove the note as it doesn't make much sense to hold our breath on itThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think that's best -- usually when we have a FIXME we want it to be actionable, or at least give sufficient context so that we know what we're waiting on (i.e.: if someone else walked up to this code tomorrow, would they know what they need in order to fix it?). It's fine to evaluate questions like this once new Rust features land in the future.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the issue with constness is that theres no good way to detect constness workarounds after the fact (ie reevaluating code like this is tricky since it appears as just somewhat odd but regular code) which is the whole reason for the const-hack comments but usually you'd tie them to specific RFCs so yeah i agree getting rid of it is fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relevant RFC fresh off the press: rust-lang/rfcs#3762