diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs
index 4ce74d29cde..be02f62314b 100644
--- a/components/script/dom/htmlinputelement.rs
+++ b/components/script/dom/htmlinputelement.rs
@@ -609,7 +609,7 @@ impl VirtualMethods for HTMLInputElement {
self.textinput.borrow_mut().max_length = Some(value as usize)
}
},
- _ => panic!("Expected an AttrValue::UInt"),
+ _ => panic!("Expected an AttrValue::Int"),
}
}
&atom!("placeholder") => {