Debian Codegraph @

debian/missing-sources/derive_more/tests/index.rs

raw
1 #![cfg_attr(not(feature = "std"), no_std)]
2 #![allow(dead_code)] // some code is tested for type checking only
3
4 #[cfg(not(feature = "std"))]
5 extern crate alloc;
6
7 #[cfg(not(feature = "std"))]
8 use alloc::vec::Vec;
9
10 use derive_more::Index;
11
12 #[derive(Index)]
13 struct MyVec(Vec<i32>);
14
15 #[derive(Index)]
16 struct Numbers {
17 #[index]
18 numbers: Vec<i32>,
19 useless: bool,
20 }