Skip to content

Commit 312c744

Browse files
committed
Add two comments on impl_add macro
1 parent eef102f commit 312c744

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/layout/dimensionality.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,15 @@ def_d_aliases!(
153153
/// Implement addition for a given dimensionality.
154154
macro_rules! impl_add {
155155
($left:literal, ($($right:literal),*), ddyn: ($($rightd:literal),*)) => {
156+
// $left + $right still gets you a compile-time dimension
156157
$(
157158
impl DAdd<NDim<$right>> for NDim<$left>
158159
{
159160
type Output = NDim<{$left + $right}>;
160161
}
161162
)*
162163

164+
// $left + $rightd gets you a dynamic dimensionality
163165
$(
164166
impl DAdd<NDim<$rightd>> for NDim<$left>
165167
{

0 commit comments

Comments
 (0)