From c4dad1cc97643c542b27dbd27f5cfdc62515586f Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 6 Oct 2019 18:03:34 +0800 Subject: Expand - Pass attributes on struct/union/enums to custom derive code --- src/expand/mod.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/expand/mod.cpp') diff --git a/src/expand/mod.cpp b/src/expand/mod.cpp index f19acda7..53358473 100644 --- a/src/expand/mod.cpp +++ b/src/expand/mod.cpp @@ -104,7 +104,7 @@ void Expand_Attrs(const ::AST::AttributeList& attrs, AttrStage stage, ::AST::Cr Expand_Attrs(attrs, stage, [&](const auto& sp, const auto& d, const auto& a){ if(!item.is_None()) { // TODO: Pass attributes _after_ this attribute - d.handle(sp, a, crate, path, mod, slice(&a, &attrs.m_items.back() - &a), item); + d.handle(sp, a, crate, path, mod, slice(&a, &attrs.m_items.back() - &a + 1), item); } }); } -- cgit v1.2.3