about summary refs log tree commit diff
path: root/tests/rustdoc/enum/enum-variant-non_exhaustive.rs
blob: ea0234a49f6409cad101d7132f63e32a56fabfe3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// regression test for https://github.com/rust-lang/rust/issues/142599

#![crate_name = "foo"]

//@ snapshot type-code 'foo/enum.Type.html' '//pre[@class="rust item-decl"]/code'
pub enum Type {
    #[non_exhaustive]
    // attribute that should not be shown
    #[warn(unsafe_code)]
    Variant,
}

// we would love to use the `following-sibling::` axis
// (along with an `h2[@id="aliased-type"]` query),
// but unfortunately python doesn't implement that.
//@ snapshot type-alias-code 'foo/type.TypeAlias.html' '//pre[@class="rust item-decl"][2]/code'
pub type TypeAlias = Type;