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

Resolve fully-qualified associated types #905

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

orangeng
Copy link

@orangeng orangeng commented Dec 7, 2023

In the parsing stage, the functionality of the syn::Impl parsing is extended to keep track of associated type implementations in trait Impls.

This info is kept in a hash-map, where the key is a combination of (self type, trait name, associated type name) and the value is the concrete type itself.

In the library/transformation stage, this populated hashmap is then referenced to resolve associated types found.

Closes #106

src/bindgen/ir/field.rs Outdated Show resolved Hide resolved
src/bindgen/library.rs Outdated Show resolved Hide resolved
@orangeng orangeng changed the title Added functionality to resolve fully-qualified trait associated types in cbindgen Added functionality to resolve fully-qualified trait associated types in cbindgen. Closes #106 Dec 7, 2023
@orangeng orangeng changed the title Added functionality to resolve fully-qualified trait associated types in cbindgen. Closes #106 Resolve fully-qualified associated types Dec 7, 2023
src/bindgen/parser.rs Outdated Show resolved Hide resolved
src/bindgen/ir/ty.rs Outdated Show resolved Hide resolved
src/bindgen/ir/ty.rs Outdated Show resolved Hide resolved
src/bindgen/parser.rs Outdated Show resolved Hide resolved
src/bindgen/parser.rs Outdated Show resolved Hide resolved
src/bindgen/parser.rs Outdated Show resolved Hide resolved
src/bindgen/parser.rs Outdated Show resolved Hide resolved
src/bindgen/parser.rs Outdated Show resolved Hide resolved
@mversic
Copy link
Contributor

mversic commented Mar 9, 2024

@emilio can we move this to completion? it's a great feature?
@orangeng can you fix the lints?

@mversic mversic force-pushed the parse-assoc-types branch 3 times, most recently from 85891a9 to fa24f93 Compare April 23, 2024 11:46
@mversic
Copy link
Contributor

mversic commented Apr 27, 2024

@emilio is there something blocking the merge of this feature?

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.

[ Feature Request ] Resolve trait associated types
2 participants