-
Notifications
You must be signed in to change notification settings - Fork 50
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
Mutable assignments variables #120
Conversation
I'm... not 100% sure how I feel about this. I'm still on the fence about allowing I'll allow it, but keep in mind that it might be broken in the future. Probably in favor of something like #75 (which in this case would mean the One change I must insist on though - one of Rust's basic tenants is that immutable should be the default, and I really don't think this rule should be violated here. The mutability should be triggered by something in the attribute: /// The sharedmem provider to get new sharaed maps if we're full
#[builder(mutable_during_default_resolution)]
shmem_provider: SP, Yes, it's long. Ugly features get ugly names. Also, this means it needs to wait until #116 gets in. Or at least until I cherry-pick some commits from it. |
Sure thing and sound reasoning, I'll make that change! I'll stay in tune with updates as they happen and in progress PRs. Happy to work on making mutability more idiomatic in the future -- for now, this will be a very helpful stopgap! I will also document the feature unless you'd prefer it remains undocumented 😉 |
#121 is in. It should now be easier to add new fields. |
The new attribute should go in |
Ok, added a doc entry and added that field attribute! I didn't see any negative tests, but I deleted |
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.
If any of these remarks are too difficult, I can do them myself after I merge.
Resolved those three notes, thanks! |
Very small change to allow a use case for LibAFL where a
default =
expression needs to mutate another field. Here's a snippet for example: