rust/tests/rustdoc/codeblock-title.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
589 B
Rust
Raw Permalink Normal View History

2017-09-08 04:06:40 +08:00
#![crate_name = "foo"]
//@ has foo/fn.bar.html '//*[@class="example-wrap compile_fail"]/*[@class="tooltip"]' "ⓘ"
//@ has foo/fn.bar.html '//*[@class="example-wrap ignore"]/*[@class="tooltip"]' "ⓘ"
//@ has foo/fn.bar.html '//*[@class="example-wrap should_panic"]/*[@class="tooltip"]' "ⓘ"
//@ has foo/fn.bar.html '//*[@title="This example runs with edition 2018"]' "ⓘ"
2017-09-08 04:06:40 +08:00
/// foo
///
/// ```compile_fail
/// foo();
/// ```
///
/// ```ignore (tidy)
/// goo();
/// ```
///
/// ```should_panic
/// hoo();
/// ```
2020-06-18 23:45:52 +08:00
///
2020-12-06 00:31:39 +08:00
/// ```edition2018
2017-09-08 04:06:40 +08:00
/// let x = 0;
/// ```
pub fn bar() -> usize { 2 }