aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 5aa3adecc41..5b81bcd46d1 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -3644,7 +3644,8 @@ class ClassConstructor(ClassItem):
"let mut ret = Rc::new(%s {\n"
"%s\n"
"});\n"
- "match rc::get_mut(&mut ret) {\n"
+ "// Note: callback cannot be moved after calling init.\n"
+ "match Rc::get_mut(&mut ret) {\n"
" Some(ref mut callback) => callback.parent.init(%s),\n"
" None => unreachable!(),\n"
"};\n"