Add @rust-attr on scturct (#2785)

Fixes: #2660
This commit is contained in:
Amirhossein Akhlaghpour 2023-06-05 17:59:55 +03:30 committed by GitHub
parent bef2e3617d
commit 3a4f3c61d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 196 additions and 16 deletions

View file

@ -173,6 +173,7 @@ impl BuiltinFunction {
.collect(),
name: Some("Size".to_string()),
node: None,
rust_attributes: None,
}),
args: vec![Type::Image],
},
@ -1027,7 +1028,7 @@ impl Expression {
},
(
Type::Struct { fields: ref left, .. },
Type::Struct { fields: right, name, node: n },
Type::Struct { fields: right, name, node: n, rust_attributes },
) if left != right => {
if let Expression::Struct { mut values, .. } = self {
let mut new_values = HashMap::new();
@ -1051,6 +1052,7 @@ impl Expression {
fields: left.clone(),
name: name.clone(),
node: n.clone(),
rust_attributes: rust_attributes.clone(),
},
}),
name: key.clone(),