data_model: fix flexible_array doc tests

Mark the FlexibleArray doc comment code block as ignored so it does not
fail when tested with `cargo test -p data_model` (this is not a full
example, since it is missing the __IncompleteArrayField struct that is
typically provided by bindgen).  Also fix a missing comma to at least
make the syntax valid.

BUG=None
TEST=cargo test -p data_model

Change-Id: Ic07daae1599df8afb272cda4f12b5f47b443f2c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2535351
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Daniel Verkamp 2020-11-12 10:04:44 -08:00 committed by Commit Bot
parent 0df9df5803
commit 4e464ae6ab

View file

@ -43,11 +43,11 @@ pub fn vec_with_array_field<T: Default, F>(count: usize) -> Vec<T> {
/// A complete definition of flexible array structs is found in the ISO 9899 specification
/// (http://www.iso-9899.info/n1570.html). A flexible array struct is of the form:
///
/// ```
/// ```ignore
/// #[repr(C)]
/// struct T {
/// some_data: u32,
/// nent: u32
/// nent: u32,
/// entries: __IncompleteArrayField<S>,
/// }
/// ```