Skip to content

Resolve fully-qualified associated types - #905

Open
orangeng wants to merge 1 commit into
mozilla:mainfrom
orangeng:parse-assoc-types
Open

orangeng wants to merge 1 commit into
mozilla:mainfrom
orangeng:parse-assoc-types

Conversation

@orangeng

@orangeng orangeng commented Dec 7, 2023 •

Copy link
Copy Markdown

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

Comment thread src/bindgen/ir/generic_path.rs Outdated
Comment thread src/bindgen/ir/field.rs Outdated
Comment thread src/bindgen/library.rs Outdated
@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
Comment thread src/bindgen/parser.rs Outdated
Comment thread src/bindgen/ir/generic_path.rs Outdated
Comment thread src/bindgen/ir/generic_path.rs Outdated
Comment thread src/bindgen/ir/generic_path.rs Outdated
Comment thread src/bindgen/ir/ty.rs
Comment thread src/bindgen/ir/ty.rs Outdated
Comment thread src/bindgen/parser.rs Outdated
Comment thread src/bindgen/parser.rs Outdated
Comment thread src/bindgen/parser.rs Outdated
Comment thread src/bindgen/parser.rs Outdated
Comment thread src/bindgen/parser.rs Outdated
@orangeng
orangeng force-pushed the parse-assoc-types branch 2 times, most recently from 2cd1735 to a76a4e8 Compare December 11, 2023 07:27
@mversic

mversic commented Mar 9, 2024

Copy link
Copy Markdown
Contributor

@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 from beb281c to 3ff88a9 Compare March 9, 2024 08:50
@mversic
mversic force-pushed the parse-assoc-types branch 4 times, most recently from fa24f93 to 2895b55 Compare April 23, 2024 11:49
@mversic

mversic commented Apr 27, 2024

Copy link
Copy Markdown
Contributor

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

@mversic
mversic force-pushed the parse-assoc-types branch 2 times, most recently from c7f64b2 to 5258104 Compare May 17, 2024 20:08
@mversic

mversic commented May 17, 2024

Copy link
Copy Markdown
Contributor

@emilio do you think we can get this PR merged soon?

@mversic
mversic force-pushed the parse-assoc-types branch 2 times, most recently from 4cd9216 to 862232e Compare June 4, 2024 11:56
@stegaBOB

Copy link
Copy Markdown

We're currently using this in prod. Would love to get this merged in! Without this PR out entire cbindgen flow wouldn't work. Thanks @orangeng for your awesome contribution!

@Lawqup

Lawqup commented Apr 1, 2026

Copy link
Copy Markdown

Any update on getting this merged?

@mversic
mversic force-pushed the parse-assoc-types branch from 33cd906 to ebc070f Compare October 1, 2026 14:39
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

4 participants