diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index d68b1adf33e..579f84301d3 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -5796,7 +5796,7 @@ class CGNonNamespacedEnum(CGThing): entries = ["%s = %s" % (names[0], first)] + names[1:] # Append a Last. - entries.append('Last = ' + str(first + len(entries))) + entries.append('#[allow(dead_code)] Last = ' + str(first + len(entries))) # Indent. entries = [' ' + e for e in entries] diff --git a/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py index f2f64e9bee0..14a11c139a9 100644 --- a/components/script/dom/bindings/codegen/Configuration.py +++ b/components/script/dom/bindings/codegen/Configuration.py @@ -399,6 +399,8 @@ class Descriptor(DescriptorProvider): def shouldHaveGetConstructorObjectMethod(self): assert self.interface.hasInterfaceObject() + if self.interface.getExtendedAttribute("Inline"): + return False return self.interface.isCallback() or self.interface.isNamespace() or self.hasDescendants() def isExposedConditionally(self): diff --git a/components/script/dom/bindings/mod.rs b/components/script/dom/bindings/mod.rs index 4e7920828dd..725cdbb4a8b 100644 --- a/components/script/dom/bindings/mod.rs +++ b/components/script/dom/bindings/mod.rs @@ -157,9 +157,9 @@ pub mod weakref; pub mod xmlname; /// Generated JS-Rust bindings. -#[allow(dead_code, missing_docs, non_snake_case)] +#[allow(missing_docs, non_snake_case)] pub mod codegen { - #[allow(unrooted_must_root)] + #[allow(dead_code, unrooted_must_root)] pub mod Bindings { include!(concat!(env!("OUT_DIR"), "/Bindings/mod.rs")); } @@ -169,7 +169,7 @@ pub mod codegen { pub mod InterfaceTypes { include!(concat!(env!("OUT_DIR"), "/InterfaceTypes.rs")); } - #[allow(unused_imports)] + #[allow(dead_code, unused_imports)] pub mod InheritTypes { include!(concat!(env!("OUT_DIR"), "/InheritTypes.rs")); }