From 201c07014799a88251efb64834889bce7c1328b4 Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Thu, 19 Oct 2023 20:06:46 +0200 Subject: [PATCH] reorder macros (avoids doc linking not working) --- src/front/wgsl/lower/mod.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/front/wgsl/lower/mod.rs b/src/front/wgsl/lower/mod.rs index 10667909f2..ae178cb702 100644 --- a/src/front/wgsl/lower/mod.rs +++ b/src/front/wgsl/lower/mod.rs @@ -13,21 +13,6 @@ use crate::{Arena, FastHashMap, FastIndexMap, Handle, Span}; mod construction; -/// Resolves the type of a given expression. -/// -/// Expects a &mut [`ExpressionContext`] and a [`Handle`]. -/// -/// Returns a &[`TypeResolution`]. -/// -/// See the documentation of [`resolve_inner!`] for why this macro is necessary. -macro_rules! resolve { - ($ctx:ident, $expr:expr) => {{ - $ctx.grow_types($expr)?; - &$ctx.typifier()[$expr] - }}; -} -pub(super) use resolve; - /// Resolves the inner type of a given expression. /// /// Expects a &mut [`ExpressionContext`] and a [`Handle`]. @@ -66,6 +51,21 @@ macro_rules! resolve_inner_binary { }}; } +/// Resolves the type of a given expression. +/// +/// Expects a &mut [`ExpressionContext`] and a [`Handle`]. +/// +/// Returns a &[`TypeResolution`]. +/// +/// See the documentation of [`resolve_inner!`] for why this macro is necessary. +macro_rules! resolve { + ($ctx:ident, $expr:expr) => {{ + $ctx.grow_types($expr)?; + &$ctx.typifier()[$expr] + }}; +} +pub(super) use resolve; + /// State for constructing a `crate::Module`. pub struct GlobalContext<'source, 'temp, 'out> { /// The `TranslationUnit`'s expressions arena.