1 #![feature(external_doc)]
5 // @has foo/struct.Example.html
6 // @matches - '//pre[@class="rust rust-example-rendered"]' \
7 // '(?m)let example = Example::new\(\)\n \.first\(\)\n \.second\(\)\n \.build\(\);\Z'
9 /// let example = Example::new()
11 #[cfg_attr(not(feature = "one"), doc = " .second()")]
16 // @has foo/struct.F.html
17 // @matches - '//pre[@class="rust rust-example-rendered"]' \
18 // '(?m)let example = Example::new\(\)\n \.first\(\)\n \.another\(\)\n \.build\(\);\Z'
20 ///let example = Example::new()
22 #[cfg_attr(not(feature = "one"), doc = " .another()")]
27 // @has foo/struct.G.html
28 // @matches - '//pre[@class="rust rust-example-rendered"]' \
29 // '(?m)let example = Example::new\(\)\n\.first\(\)\n \.another\(\)\n\.build\(\);\Z'
31 ///let example = Example::new()
33 #[cfg_attr(not(feature = "one"), doc = " .another()")]
38 // @has foo/struct.H.html
39 // @has - '//div[@class="docblock"]/p' 'no whitespace lol'
44 // @has foo/struct.I.html
45 // @matches - '//pre[@class="rust rust-example-rendered"]' '(?m)4 whitespaces!\Z'
50 // @has foo/struct.J.html
51 // @matches - '//div[@class="docblock"]/p' '(?m)a\nno whitespace\nJust some text.\Z'
54 #[doc(include = "unindent.md")]
57 // @has foo/struct.K.html
58 // @matches - '//pre[@class="rust rust-example-rendered"]' '(?m)4 whitespaces!\Z'
63 #[doc(include = "unindent.md")]