Skip to content

Commit

Permalink
Add failing test for cross-crate enum in type alias
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed May 20, 2024
1 parent d84b903 commit dbfed2c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/rustdoc/auxiliary/cross_crate_generic_typedef.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ pub struct InlineOne<A> {
}

pub type InlineU64 = InlineOne<u64>;

pub enum GenericEnum<T> {
Variant(T),
Variant2(T, T),
}
7 changes: 7 additions & 0 deletions tests/rustdoc/typedef-inner-variants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,10 @@ pub type HighlyGenericAABB<A, B> = HighlyGenericStruct<A, A, B, B>;
// @count - '//*[@id="variants"]' 0
// @count - '//*[@id="fields"]' 1
pub use cross_crate_generic_typedef::InlineU64;

// @has 'inner_variants/type.InlineEnum.html'
// @count - '//*[@id="aliased-type"]' 1
// @count - '//*[@id="variants"]' 1
// @count - '//*[@id="fields"]' 0
// @count - '//*[@class="variant"]' 2
pub type InlineEnum = cross_crate_generic_typedef::GenericEnum<i32>;

0 comments on commit dbfed2c

Please sign in to comment.