Address review comments; add docs

This commit is contained in:
Manish Goregaokar 2015-07-22 18:28:02 +05:30
parent 521d8bc32e
commit a9f651cfa1
2 changed files with 9 additions and 5 deletions

View file

@ -26,6 +26,10 @@ declare_lint!(UNROOTED_MUST_ROOT, Deny,
///
/// This helps catch most situations where pointers like `JS<T>` are used in a way that they can be invalidated by a
/// GC pass.
///
/// Structs which have their own mechanism of rooting their unrooted contents (e.g. `ScriptTask`)
/// can be marked as `#[allow(unrooted_must_root)]`. Smart pointers which root their interior type
/// can be marked as `#[allow_unrooted_interior]`
pub struct UnrootedPass {
in_new_function: bool
}