]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/codeblock-title.rs
Auto merge of #77893 - petertodd:2020-impl-default-for-phantompinned, r=dtolnay
[rust.git] / src / test / rustdoc / codeblock-title.rs
1 #![crate_name = "foo"]
2
3 // ignore-tidy-linelength
4
5 // @has foo/fn.bar.html '//*[@class="tooltip compile_fail"]/span' "This example deliberately fails to compile"
6 // @has foo/fn.bar.html '//*[@class="tooltip ignore"]/span' "This example is not tested"
7 // @has foo/fn.bar.html '//*[@class="tooltip should_panic"]/span' "This example panics"
8
9 /// foo
10 ///
11 /// ```compile_fail
12 /// foo();
13 /// ```
14 ///
15 /// ```ignore (tidy)
16 /// goo();
17 /// ```
18 ///
19 /// ```should_panic
20 /// hoo();
21 /// ```
22 ///
23 /// ```
24 /// let x = 0;
25 /// ```
26 pub fn bar() -> usize { 2 }