diff options
Diffstat (limited to 'components/plugins/lints')
-rw-r--r-- | components/plugins/lints/ban.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/plugins/lints/ban.rs b/components/plugins/lints/ban.rs index 02037a5d76a..0e1ebc94721 100644 --- a/components/plugins/lints/ban.rs +++ b/components/plugins/lints/ban.rs @@ -37,5 +37,11 @@ impl EarlyLintPass for BanPass { .is_some() { cx.span_lint(BANNED_TYPE, ty.span, "Banned type Cell<JSVal> detected. Use MutHeap<JSVal> instead") } + if match_ty_unwrap(ty, &["dom", "bindings", "cell", "DOMRefCell"]) + .and_then(|t| t.get(0)) + .and_then(|t| match_ty_unwrap(&**t, &["dom", "bindings", "js", "JS"])) + .is_some() { + cx.span_lint(BANNED_TYPE, ty.span, "Banned type DOMRefCell<JS<T>> detected. Use MutHeap<JS<T>> instead") + } } } |