Skip to content

Commit df6d5c9

Browse files
committed
tests bild for all feature in power set now
1 parent 64e7c2e commit df6d5c9

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/individual_table.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -239,23 +239,23 @@ impl<'a> IndividualTable<'a> {
239239
///
240240
/// This type has the wrong trait bound and will cause compilation to fail:
241241
///
242-
/// ```compile_fail
243-
/// # #[cfg(feature = "derive")] {
244-
/// # #[derive(serde::Serialize, serde::Deserialize, tskit::metadata::MutationMetadata)]
245-
/// # #[serializer("serde_json")]
246-
/// # struct MutationMetadata {
247-
/// # x: i32,
248-
/// # }
249-
/// # use tskit::TableAccess;
250-
/// # let mut tables = tskit::TableCollection::new(10.).unwrap();
251-
/// match tables.individuals().metadata::<MutationMetadata>(0.into())
252-
/// {
253-
/// Some(Ok(metadata)) => assert_eq!(metadata.x, 1),
254-
/// Some(Err(_)) => panic!("got an error??"),
255-
/// None => panic!("Got None??"),
256-
/// };
257-
/// # }
258-
/// ```
242+
#[cfg_attr(feature = "derive", doc = r##"
243+
```compile_fail
244+
# #[derive(serde::Serialize, serde::Deserialize, tskit::metadata::MutationMetadata)]
245+
# #[serializer("serde_json")]
246+
# struct MutationMetadata {
247+
# x: i32,
248+
# }
249+
# use tskit::TableAccess;
250+
# let mut tables = tskit::TableCollection::new(10.).unwrap();
251+
match tables.individuals().metadata::<MutationMetadata>(0.into())
252+
{
253+
Some(Ok(metadata)) => assert_eq!(metadata.x, 1),
254+
Some(Err(_)) => panic!("got an error??"),
255+
None => panic!("Got None??"),
256+
};
257+
```
258+
"##)]
259259
///
260260
/// ## Limitations: different type, same trait bound
261261
///

0 commit comments

Comments
 (0)