Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
urso committed Jan 15, 2024
1 parent 4a6ff4b commit 153f5c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions derive/src/derive_attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ fn impl_attribute(def_attrib: &DefAttribute) -> TokenStream {
}
}

fn verify_interfaces(&self, ctx: &Context) -> ::pliron::error::Result<()> {
fn verify_interfaces(&self, ctx: &::pliron::context::Context) -> ::pliron::error::Result<()> {
let interface_verifiers = ::inventory::iter::<#verifiers_name>();
for verifier in interface_verifiers {
(verifier.0)(self, ctx)?;
Expand Down Expand Up @@ -258,7 +258,7 @@ mod tests {
}
}

fn verify_interfaces(&self, ctx: &Context) -> ::pliron::error::Result<()> {
fn verify_interfaces(&self, ctx: &::pliron::context::Context) -> ::pliron::error::Result<()> {
let interface_verifiers = ::inventory::iter::<AttrInterfaceVerifier_UnitAttr>();
for verifier in interface_verifiers {
(verifier.0)(self, ctx)?;
Expand Down
5 changes: 3 additions & 2 deletions derive/src/derive_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ impl Attrs {
let mut attributes = vec![];

for attr in input {
if attr.path().is_ident(DialectName::ATTR_NAME) {
if attr.path().is_ident("def_type") {
continue;
} else if attr.path().is_ident(DialectName::ATTR_NAME) {
require_once(DialectName::ATTR_NAME, &dialect, attr)?;
dialect = Some(DialectName::from_syn(attr)?);
} else if attr.path().is_ident(TypeName::ATTR_NAME) {
Expand Down Expand Up @@ -216,7 +218,6 @@ mod tests {

let want = quote! {
#[derive(::pliron_derive::DeriveAttribDummy)]
#[def_type]
#[derive(Hash, PartialEq, Eq, Debug)]
#[ir_kind = "type"]
pub struct SimpleType {}
Expand Down

0 comments on commit 153f5c2

Please sign in to comment.