@@ -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