Skip to content
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

Simplify Guard API and reduce its use in CoreArrayProvider #5880

Closed
wants to merge 22 commits into from

Conversation

mkrasnitski
Copy link
Contributor

The value of the lifetime parameter 'a in Guard<'a> can be inferred via type checking and doesn't actually need to be directly linked to an owner parameter. Additionally, lots of types whose Wrapped<'a> associated type was a Guard<'a, Self> can instead be made #[repr(transparent)] and their wrapped type changed to &'a Self.

A few types still require using Guard because they aren't able to be made #[repr(transparent)], namely:

  • BasicBlock
  • CallingConvention
  • LinearDisassemblyLine
  • CodeReference
  • Array<InstructionToken>

Also, a few types which weren't able to be marked #[repr(transparent)] were changed to return an owned Self instead of a Guard:

  • NamedTypedVariable
  • StructureMember

emesare and others added 22 commits July 28, 2024 17:15
It serves no purpose.
When linking you must depend on the -sys crate
Might want to change this to a in-tree binary later
We link to the core now so these can be ran
Allows language bindings like rust to free register lists sanely
…m rust api

Allows language bindings like rust to free conditions lists sanely

# Conflicts:
#	rust/Cargo.lock
@emesare emesare force-pushed the rust_break_everything branch from ce5995c to 35fe347 Compare August 24, 2024 20:51
@emesare emesare self-requested a review August 24, 2024 22:31
@emesare emesare self-assigned this Aug 24, 2024
@emesare emesare force-pushed the rust_break_everything branch from 35fe347 to ea111b5 Compare August 24, 2024 22:54
@emesare
Copy link
Member

emesare commented Aug 24, 2024

LGTM, committed with 53466cd

@emesare emesare closed this Aug 24, 2024
@mkrasnitski mkrasnitski deleted the array branch December 15, 2024 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants