diff --git a/components/script/lib.rs b/components/script/lib.rs index 9c2bf9b7b46..52c0cd6f358 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -105,7 +105,7 @@ pub mod clipboard_provider; mod devtools; pub mod document_loader; #[macro_use] -pub mod dom; +mod dom; pub mod fetch; pub mod layout_wrapper; mod mem; diff --git a/components/script/test.rs b/components/script/test.rs index 694998714a6..ca00b200788 100644 --- a/components/script/test.rs +++ b/components/script/test.rs @@ -5,6 +5,11 @@ pub use dom::bindings::str::{ByteString, DOMString}; pub use dom::headers::normalize_value; +// For compile-fail tests only. +pub use dom::bindings::cell::DOMRefCell; +pub use dom::bindings::js::JS; +pub use dom::node::Node; + pub mod size_of { use dom::characterdata::CharacterData; use dom::element::Element; diff --git a/tests/compiletest/plugin/compile-fail/ban-domrefcell.rs b/tests/compiletest/plugin/compile-fail/ban-domrefcell.rs index 967654ebcce..4ec48545361 100644 --- a/tests/compiletest/plugin/compile-fail/ban-domrefcell.rs +++ b/tests/compiletest/plugin/compile-fail/ban-domrefcell.rs @@ -7,9 +7,9 @@ extern crate script; -use script::dom::bindings::cell::DOMRefCell; -use script::dom::bindings::js::JS; -use script::dom::node::Node; +use script::test::DOMRefCell; +use script::test::JS; +use script::test::Node; struct Foo { bar: DOMRefCell>