Bug 1902605 - mark nonidl structs as allowed dead code. r=xpcom-reviewers,emilio

Differential Revision: https://phabricator.services.mozilla.com/D213738
This commit is contained in:
Mike Hommey 2024-06-14 09:41:08 +00:00
parent aca4873758
commit 0d52c03673

View File

@ -17,6 +17,9 @@ macro_rules! nonidl {
($name:ident, $iid:expr) => {
/// This interface is referenced from idl files, but not defined in
/// them. It exports no methods to rust code.
// As of rustc 1.80, structs that are never constructed are considered dead code,
// but this is constructed from C++. Somehow these aren't caught before 1.81.
#[allow(dead_code)]
#[repr(C)]
pub struct $name {
_vtable: *const $crate::interfaces::nsISupportsVTable,