rust/tests/ui/enum-discriminant/forbidden-discriminant-kind-impl.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
276 B
Rust
Raw Normal View History

2020-04-05 20:20:38 +00:00
#![feature(discriminant_kind)]
use std::marker::DiscriminantKind;
enum Uninhabited {}
struct NewType;
impl DiscriminantKind for NewType {
//~^ ERROR explicit impls for the `DiscriminantKind` trait are not permitted
type Discriminant = Uninhabited;
}
fn main() {}