diff --git a/tests/rustdoc/import_trait_associated_functions.rs b/tests/rustdoc/import_trait_associated_functions.rs new file mode 100644 index 000000000000..84f6f8009701 --- /dev/null +++ b/tests/rustdoc/import_trait_associated_functions.rs @@ -0,0 +1,19 @@ +// This test ensures that reexports of associated items links to the associated items. +// Regression test for . + +#![feature(import_trait_associated_functions)] + +#![crate_name = "foo"] + +//@ has 'foo/index.html' + +pub trait Test { + fn method(); + const CONST: u8; + type Type; +} + +//@ has - '//*[@id="reexport.method"]//a[@href="trait.Test.html#tymethod.method"]' 'method' +//@ has - '//*[@id="reexport.CONST"]//a[@href="trait.Test.html#associatedconstant.CONST"]' 'CONST' +//@ has - '//*[@id="reexport.Type"]//a[@href="trait.Test.html#associatedtype.Type"]' 'Type' +pub use self::Test::{method, CONST, Type};