Add the rust-tenacious move-protection lint, use it for Root<T> (fixes #5724)

This commit is contained in:
Manish Goregaokar 2015-04-26 22:54:34 +05:30
parent 8ecb9d681c
commit 63714ebc5f
5 changed files with 23 additions and 0 deletions

View file

@ -626,6 +626,7 @@ impl RootCollection {
/// for the same JS value. `Root`s cannot outlive the associated
/// `RootCollection` object. Attempts to transfer ownership of a `Root` via
/// moving will trigger dynamic unrooting failures due to incorrect ordering.
#[no_move]
pub struct Root<T> {
/// List that ensures correct dynamic root ordering
root_list: &'static RootCollection,