Add regression test for #148008

This commit is contained in:
Guillaume Gomez 2025-11-05 17:51:27 +01:00
parent 101ef2bf81
commit 044245c6c8

View file

@ -0,0 +1,19 @@
// This test ensures that reexports of associated items links to the associated items.
// Regression test for <https://github.com/rust-lang/rust/issues/148008>.
#![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};