--- a/third_party/rust/allocator-api2/src/stable/vec/mod.rs
+++ b/third_party/rust/allocator-api2/src/stable/vec/mod.rs
@@ -51,6 +51,8 @@
 //!
 //! [`push`]: Vec::push
 
+#![warn(dangerous_implicit_autorefs)]
+
 #[cfg(not(no_global_oom_handling))]
 use core::cmp;
 use core::cmp::Ordering;
