aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py4
-rw-r--r--components/script/dom/htmlmediaelement.rs3
2 files changed, 5 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 6329a81048f..d68b1adf33e 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -4260,7 +4260,9 @@ class CGUnionConversionStruct(CGThing):
return CGWrapper(
CGIndenter(jsConversion, 4),
- pre="unsafe fn TryConvertTo%s(cx: *mut JSContext, value: HandleValue) -> %s {\n" % (t.name, returnType),
+ # TryConvertToObject is unused, but not generating it while generating others is tricky.
+ pre="#[allow(dead_code)] unsafe fn TryConvertTo%s(cx: *mut JSContext, value: HandleValue) -> %s {\n"
+ % (t.name, returnType),
post="\n}")
def define(self):
diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs
index 8a3f35c23d4..ad899de4c9d 100644
--- a/components/script/dom/htmlmediaelement.rs
+++ b/components/script/dom/htmlmediaelement.rs
@@ -437,6 +437,7 @@ impl HTMLMediaElement {
}
// https://html.spec.whatwg.org/multipage/#concept-media-load-algorithm
+ #[allow(unreachable_code)]
fn resource_selection_algorithm_sync(&self, base_url: ServoUrl) {
// TODO step 5 (populate pending text tracks)
@@ -446,7 +447,7 @@ impl HTMLMediaElement {
ResourceSelectionMode::Object
} else if let Some(attr) = self.upcast::<Element>().get_attribute(&ns!(), &local_name!("src")) {
ResourceSelectionMode::Attribute(attr.Value().to_string())
- } else if false {
+ } else if false { // TODO: when implementing this remove #[allow(unreachable_code)] above.
// TODO <source> child
ResourceSelectionMode::Children(panic!())
} else {