Skip to content

Commit 4173443

Browse files
[layout] Update test documentation (#2026) (#2396)
gherrit-pr-id: I8aec00c4246e0e9f80c90c3295ffd79921d4d8b3 Co-authored-by: Joshua Liebow-Feeser <joshlf@users.noreply.github.com>
1 parent fe70ab6 commit 4173443

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/layout.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -813,16 +813,15 @@ mod tests {
813813

814814
/// This macro accepts arguments in the form of:
815815
///
816-
/// layout(_, _, _).validate(_, _, _), Ok(Some((_, _)))
817-
/// | | | | | | | |
818-
/// base_size ----+ | | | | | | |
819-
/// align -----------+ | | | | | |
820-
/// trailing_size ------+ | | | | |
821-
/// addr ---------------------------+ | | | |
822-
/// bytes_len -------------------------+ | | |
823-
/// cast_type ----------------------------+ | |
824-
/// elems ---------------------------------------------+ |
825-
/// split_at ---------------------------------------------+
816+
/// layout(_, _).validate(_, _, _), Ok(Some((_, _)))
817+
/// | | | | | | |
818+
/// size ---------+ | | | | | |
819+
/// align -----------+ | | | | |
820+
/// addr ------------------------+ | | | |
821+
/// bytes_len ----------------------+ | | |
822+
/// cast_type -------------------------+ | |
823+
/// elems ------------------------------------------+ |
824+
/// split_at ------------------------------------------+
826825
///
827826
/// `.validate` is shorthand for `.validate_cast_and_convert_metadata`
828827
/// for brevity.
@@ -855,7 +854,7 @@ mod tests {
855854
/// `a..b`). In this case, wrap the expression in parentheses, and it
856855
/// will become valid `tt`.
857856
macro_rules! test {
858-
($(:$sizes:expr =>)?
857+
(
859858
layout($size:tt, $align:tt)
860859
.validate($addr:tt, $bytes_len:tt, $cast_type:tt), $expect:pat $(,)?
861860
) => {

0 commit comments

Comments
 (0)