Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove SecondaryAttribute::Event #4868

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions compiler/noirc_frontend/src/lexer/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,6 @@ impl Attribute {
["contract_library_method"] => {
Attribute::Secondary(SecondaryAttribute::ContractLibraryMethod)
}
["event"] => Attribute::Secondary(SecondaryAttribute::Event),
["abi", tag] => Attribute::Secondary(SecondaryAttribute::Abi(tag.to_string())),
["export"] => Attribute::Secondary(SecondaryAttribute::Export),
["deprecated", name] => {
Expand Down Expand Up @@ -751,7 +750,6 @@ pub enum SecondaryAttribute {
// is a helper method for a contract and should not be seen as
// the entry point.
ContractLibraryMethod,
Event,
Export,
Field(String),
Custom(String),
Expand All @@ -767,7 +765,6 @@ impl fmt::Display for SecondaryAttribute {
}
SecondaryAttribute::Custom(ref k) => write!(f, "#[{k}]"),
SecondaryAttribute::ContractLibraryMethod => write!(f, "#[contract_library_method]"),
SecondaryAttribute::Event => write!(f, "#[event]"),
SecondaryAttribute::Export => write!(f, "#[export]"),
SecondaryAttribute::Field(ref k) => write!(f, "#[field({k})]"),
SecondaryAttribute::Abi(ref k) => write!(f, "#[abi({k})]"),
Expand Down Expand Up @@ -797,7 +794,7 @@ impl AsRef<str> for SecondaryAttribute {
| SecondaryAttribute::Field(string)
| SecondaryAttribute::Abi(string) => string,
SecondaryAttribute::ContractLibraryMethod => "",
SecondaryAttribute::Event | SecondaryAttribute::Export => "",
SecondaryAttribute::Export => "",
}
}
}
Expand Down
Loading