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.