File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ // Regression test for <https://github.com/rust-lang/rust/issues/94183>.
2+ // This test ensures that a publicly re-exported private trait will
3+ // appear in the blanket impl list.
4+
5+ #![ crate_name = "foo" ]
6+
7+ // @has 'foo/struct.S.html'
8+
9+ mod actual_sub {
10+ pub trait Actual { }
11+ pub trait Another { }
12+
13+ // `Another` is publicly re-exported so it should appear in the blanket impl list.
14+ // @has - '//*[@id="blanket-implementations-list"]//*[@class="code-header"]' 'impl<T> Another for T'
15+ impl < T > Another for T { }
16+
17+ trait Foo { }
18+
19+ // `Foo` is not publicly re-exported nor reachable so it shouldn't appear in the
20+ // blanket impl list.
21+ // @!has - '//*[@id="blanket-implementations-list"]//*[@class="code-header"]' 'impl<T> Foo for T'
22+ impl < T > Foo for T { }
23+ }
24+
25+ pub use actual_sub:: { Actual , Another } ;
26+
27+ // `Actual` is publicly re-exported so it should appear in the blanket impl list.
28+ // @has - '//*[@id="blanket-implementations-list"]//*[@class="code-header"]' 'impl<T> Actual for T'
29+ impl < T > Actual for T { }
30+
31+ pub struct S ;
You can’t perform that action at this time.
0 commit comments