Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Feb 7, 2024
1 parent 6019ab7 commit 17b42f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 2 additions & 6 deletions core/src/hir/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,13 @@ impl Attrs {
context,
AttributeContext::Method | AttributeContext::EnumVariant
) {
errors.push(LoweringError::Other(format!(
"`namespace` can only be used on types"
)));
errors.push(LoweringError::Other("`namespace` can only be used on types".to_string()));
continue;
}
match StandardAttribute::from_meta(&attr.meta) {
Ok(StandardAttribute::String(s)) => this.namespace = Some(s),
Ok(_) | Err(_) => {
errors.push(LoweringError::Other(format!(
"`namespace` must have a single string parameter"
)));
errors.push(LoweringError::Other("`namespace` must have a single string parameter".to_string()));
continue;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ TypeContext {
),
attrs: Attrs {
disable: false,
namespace: None,
rename: RenameAttr {
pattern: None,
},
Expand All @@ -103,6 +104,7 @@ TypeContext {
],
attrs: Attrs {
disable: false,
namespace: None,
rename: RenameAttr {
pattern: None,
},
Expand Down Expand Up @@ -210,6 +212,7 @@ TypeContext {
),
attrs: Attrs {
disable: false,
namespace: None,
rename: RenameAttr {
pattern: None,
},
Expand All @@ -221,6 +224,7 @@ TypeContext {
],
attrs: Attrs {
disable: false,
namespace: None,
rename: RenameAttr {
pattern: None,
},
Expand Down Expand Up @@ -250,6 +254,7 @@ TypeContext {
methods: [],
attrs: Attrs {
disable: false,
namespace: None,
rename: RenameAttr {
pattern: None,
},
Expand Down

0 comments on commit 17b42f6

Please sign in to comment.