(&self)
| 534 | |
| 535 | impl AttributeExt for Attribute { |
| 536 | fn promoted_nested(&self) -> Result<PunctuatedNestedMeta> { |
| 537 | let list = self.promoted_list().map_err(|mut e| { |
| 538 | let name = self.get_ident().unwrap().to_string(); |
| 539 | e.combine(err_span!( |
| 540 | self, |
| 541 | r##"#[{name} = "..."] cannot be a name/value, you probably meant \ |
| 542 | #[{name}(name = "...")]"##, |
| 543 | )); |
| 544 | e |
| 545 | })?; |
| 546 | Ok(list.nested) |
| 547 | } |
| 548 | fn ident_and_promoted_nested(&self) -> Result<(&Ident, PunctuatedNestedMeta)> { |
| 549 | Ok((self.get_ident().unwrap(), self.promoted_nested()?)) |
| 550 | } |
no test coverage detected