Unreserve braced enum variants in value namespace
This commit is contained in:
parent
1cbc45942d
commit
7a5376d23c
71 changed files with 364 additions and 642 deletions
|
@ -564,7 +564,7 @@ fn check_for_bindings_named_same_as_variants(
|
|||
&& let ty::Adt(edef, _) = pat_ty.kind()
|
||||
&& edef.is_enum()
|
||||
&& edef.variants().iter().any(|variant| {
|
||||
variant.ident(cx.tcx) == ident && variant.ctor_kind == CtorKind::Const
|
||||
variant.ident(cx.tcx) == ident && variant.ctor_kind() == Some(CtorKind::Const)
|
||||
})
|
||||
{
|
||||
let variant_count = edef.variants().len();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue