What are the rules for a rustdoc test of a method to pass?
Clash Royale CLAN TAG #URR8PPP What are the rules for a rustdoc test of a method to pass? I am trying to write a rustdoc test of a method called insert . The testing function is called in the last line of the test, and when I comment it out the test passes just fine. insert Here is the (unhelpful) error message: $ cargo test ... failures: src/blindhide.rs - blindhide::BlindHide::insert (line 34) Could it be that there are special rules for a rustdoc test to pass (for example the use of assert! macro to prove that it returns a proper value)? assert! I am asking because my method passes integration test with very similar code, so I am pretty confident it's correct The test: /// # Examples /// ``` /// extern crate crypsto; /// extern crate rgb; /// /// use std::slice; /// use rgb::RGB; /// /// let msg = "This is a secret message".as_bytes(); /// let img = vec![RGB {r: 0, g: 0, b: 0}; 800*500]; /// /// // Create a reference to the bytes of img /// let p: *const Vec<RG...