aboutsummaryrefslogtreecommitdiffstats
path: root/components/plugins/lib.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-02-15 17:48:36 +0100
committerAnthony Ramine <n.oxyde@gmail.com>2017-02-15 22:11:20 +0100
commita6d59d87145ad03a95c65e5f9b384b46a91687a4 (patch)
treefaeb12aa1dbe9c108d963b1fb04222d16a285a49 /components/plugins/lib.rs
parent37dab8f9f2727debc015c3a16416cd80e9b235d4 (diff)
downloadservo-a6d59d87145ad03a95c65e5f9b384b46a91687a4.tar.gz
servo-a6d59d87145ad03a95c65e5f9b384b46a91687a4.zip
Replace inheritance_integrity by trait shenanigans
For each derived DomObject impl, we also generate a dummy trait ShouldNotImplDomObject that is implemented for all T: DomObject. We then try to implement it for each field type except the first one. If compilation succeed, this means that field type doesn't implement DomObject itself otherwise it would break coherence rules. error[E0119]: conflicting implementations of trait `dom::xmlhttprequest::_IMPL_DOMOBJECT_FOR_XMLHttpRequest::ShouldNotImplDomObject` for type `((), SomeFieldTypeThatShouldNotImplementDomObject)`: --> /Users/nox/src/servo/components/script/dom/xmlhttprequest.rs:120:1 | 120 | #[dom_struct] | ^^^^^^^^^^^^^ | | | first implementation here | conflicting implementation for `((), SomeFieldTypeThatShouldNotImplementDomObject)`
Diffstat (limited to 'components/plugins/lib.rs')
-rw-r--r--components/plugins/lib.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/components/plugins/lib.rs b/components/plugins/lib.rs
index 7b897cb10e0..03585ae3718 100644
--- a/components/plugins/lib.rs
+++ b/components/plugins/lib.rs
@@ -44,12 +44,9 @@ pub fn plugin_registrar(reg: &mut Registry) {
MultiModifier(box jstraceable::expand_dom_struct));
reg.register_late_lint_pass(box lints::unrooted_must_root::UnrootedPass::new());
- reg.register_late_lint_pass(box lints::inheritance_integrity::InheritancePass);
reg.register_early_lint_pass(box lints::ban::BanPass);
- reg.register_attribute("_dom_struct_marker".to_string(), Whitelisted);
reg.register_attribute("allow_unrooted_interior".to_string(), Whitelisted);
reg.register_attribute("must_root".to_string(), Whitelisted);
- reg.register_attribute("servo_lang".to_string(), Whitelisted);
register_clippy(reg);
}