Auto merge of #9946 - yoava333:master, r=KiChjang

Added compiler lint ban on DOMRefCell

this resolves https://github.com/servo/servo/issues/9924

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9946)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-03-10 04:44:33 +05:30
commit d23b7481d6
4 changed files with 29 additions and 0 deletions

View file

@ -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")
}
}
}