rust/src/test/rustdoc/codeblock-title.rs

27 lines
541 B
Rust
Raw Normal View History

2017-09-07 20:06:40 +00:00
#![crate_name = "foo"]
// ignore-tidy-linelength
// @has foo/fn.bar.html '//*[@class="tooltip compile_fail"]/span' "This example deliberately fails to compile"
// @has foo/fn.bar.html '//*[@class="tooltip ignore"]/span' "This example is not tested"
// @has foo/fn.bar.html '//*[@class="tooltip should_panic"]/span' "This example panics"
2017-09-07 20:06:40 +00:00
/// foo
///
/// ```compile_fail
/// foo();
/// ```
///
/// ```ignore (tidy)
/// goo();
/// ```
///
/// ```should_panic
/// hoo();
/// ```
2020-06-18 15:45:52 +00:00
///
2017-09-07 20:06:40 +00:00
/// ```
/// let x = 0;
/// ```
pub fn bar() -> usize { 2 }