]> git.proxmox.com Git - rustc.git/blob - src/test/rustdoc/unindent.rs
Update unsuspicious file list
[rustc.git] / src / test / rustdoc / unindent.rs
1 #![crate_name = "foo"]
2
3 // @has foo/struct.Example.html
4 // @matches - '//pre[@class="rust rust-example-rendered"]' \
5 // '(?m)let example = Example::new\(\)\n \.first\(\)\n \.second\(\)\n \.build\(\);\Z'
6 /// ```rust
7 /// let example = Example::new()
8 /// .first()
9 #[cfg_attr(not(feature = "one"), doc = " .second()")]
10 /// .build();
11 /// ```
12 pub struct Example;
13
14 // @has foo/struct.F.html
15 // @matches - '//pre[@class="rust rust-example-rendered"]' \
16 // '(?m)let example = Example::new\(\)\n \.first\(\)\n \.another\(\)\n \.build\(\);\Z'
17 ///```rust
18 ///let example = Example::new()
19 /// .first()
20 #[cfg_attr(not(feature = "one"), doc = " .another()")]
21 /// .build();
22 /// ```
23 pub struct F;
24
25 // @has foo/struct.G.html
26 // @matches - '//pre[@class="rust rust-example-rendered"]' \
27 // '(?m)let example = Example::new\(\)\n\.first\(\)\n \.another\(\)\n\.build\(\);\Z'
28 ///```rust
29 ///let example = Example::new()
30 ///.first()
31 #[cfg_attr(not(feature = "one"), doc = " .another()")]
32 ///.build();
33 ///```
34 pub struct G;
35
36 // @has foo/struct.H.html
37 // @has - '//div[@class="docblock"]/p' 'no whitespace lol'
38 ///no whitespace
39 #[doc = " lol"]
40 pub struct H;
41
42 // @has foo/struct.I.html
43 // @matches - '//pre[@class="rust rust-example-rendered"]' '(?m)4 whitespaces!\Z'
44 /// 4 whitespaces!
45 #[doc = "something"]
46 pub struct I;
47
48 // @has foo/struct.J.html
49 // @matches - '//div[@class="docblock"]/p' '(?m)a\nno whitespace\nJust some text.\Z'
50 ///a
51 ///no whitespace
52 #[doc = include_str!("unindent.md")]
53 pub struct J;
54
55 // @has foo/struct.K.html
56 // @matches - '//pre[@class="rust rust-example-rendered"]' '(?m)4 whitespaces!\Z'
57 ///a
58 ///
59 /// 4 whitespaces!
60 ///
61 #[doc = include_str!("unindent.md")]
62 pub struct K;