Remove VALID_ALIAS_ATTRIBUTES array (#1731)

This commit is contained in:
Casey Rodarmor 2023-11-20 17:35:29 -06:00 committed by GitHub
parent fde6d22c1b
commit bfea1ae5f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,5 @@
use {super::*, CompileErrorKind::*};
const VALID_ALIAS_ATTRIBUTES: [Attribute; 1] = [Attribute::Private];
#[derive(Default)]
pub(crate) struct Analyzer<'src> {
assignments: Table<'src, Assignment<'src>>,
@ -150,7 +148,7 @@ impl<'src> Analyzer<'src> {
}
for attr in &alias.attributes {
if !VALID_ALIAS_ATTRIBUTES.contains(attr) {
if *attr != Attribute::Private {
return Err(alias.name.token().error(AliasInvalidAttribute {
alias: name,
attr: *attr,