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
Copy link
Member

emesare commented Aug 24, 2024

LGTM, committed with 53466cd

@emesare emesare closed this Aug 24, 2024
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