Skip to content

Commit dbfed2c

Browse files
Add failing test for cross-crate enum in type alias
1 parent d84b903 commit dbfed2c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/rustdoc/auxiliary/cross_crate_generic_typedef.rs

+5
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ pub struct InlineOne<A> {
33
}
44

55
pub type InlineU64 = InlineOne<u64>;
6+
7+
pub enum GenericEnum<T> {
8+
Variant(T),
9+
Variant2(T, T),
10+
}

tests/rustdoc/typedef-inner-variants.rs

+7
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,10 @@ pub type HighlyGenericAABB<A, B> = HighlyGenericStruct<A, A, B, B>;
117117
// @count - '//*[@id="variants"]' 0
118118
// @count - '//*[@id="fields"]' 1
119119
pub use cross_crate_generic_typedef::InlineU64;
120+
121+
// @has 'inner_variants/type.InlineEnum.html'
122+
// @count - '//*[@id="aliased-type"]' 1
123+
// @count - '//*[@id="variants"]' 1
124+
// @count - '//*[@id="fields"]' 0
125+
// @count - '//*[@class="variant"]' 2
126+
pub type InlineEnum = cross_crate_generic_typedef::GenericEnum<i32>;

0 commit comments

Comments
 (0)