add regression test for RUST-143222

This commit is contained in:
binarycat 2025-07-11 13:45:51 -05:00
parent 35487a2e7c
commit 293f95fb0c
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,12 @@
pub trait Assoc {
type Ty;
}
pub struct Foo(<Foo as crate::Assoc>::Ty);
const _: () = {
impl crate::Assoc for Foo {
type Ty = Bar;
}
pub struct Bar;
};

View file

@ -0,0 +1,12 @@
//@ compile-flags: -Z normalize-docs --document-private-items -Zunstable-options --show-type-layout
//@ aux-build:wrap-unnamable-type.rs
//@ build-aux-docs
#![crate_name = "foo"]
extern crate wrap_unnamable_type as helper;
//extern crate helper;
//@ has 'foo/struct.Foo.html'
//@ !hasraw - '_/struct.Bar.html'
#[doc(inline)]
pub use helper::Foo;