Closed Bug 1664526 Opened 4 years ago Closed 4 years ago

Support generic types in #[derive(xpcom)]

Categories

(Core :: XPCOM, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: nika, Assigned: nika)

References

Details

Attachments

(1 file)

When I originally wrote rust-xpcom support, it wasn't possible to implement generic vtables in Rust. With updates and improvements to the language since then, it is now possible to do, so this patch adds support for implementing xpcom interfaces on generic structs.

When I originally wrote rust-xpcom support, it wasn't possible to implement
generic vtables in Rust. With updates and improvements to the language since
then, it is now possible to do, so this patch adds support for implementing
xpcom interfaces on generic structs.

All generic parameters to these structs are required to have a 'static
lifetime bound, as it is not possible to safely represent xpcom interface
objects which contain internal non-'static references.

Blocks: 1660393
Pushed by nlayzell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c51d066ffa90
Support generics when implementing xpcom interfaces in Rust, r=emilio,kamidphish
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: