Sign in
rust
/
rust-lang
/
rust
/
refs/heads/lcnr/rustc-dev-guide
/
.
/
tests
/
ui
/
enum
/
single-variant-enum-deref-error-9814.rs
blob: f10d665299cf4eba96efd04cbb68619f4303abe2 [
file
] [
log
] [
blame
]
// https://github.com/rust-lang/rust/issues/9814
// Verify that single-variant enums can't be de-referenced
// Regression test for issue #9814
enum
Foo
{
Bar
(
isize
)
}
fn
main
()
{
let
_
=
*
Foo
::
Bar
(
2
);
//~ ERROR type `Foo` cannot be dereferenced
}