2017-09-07 15:06:40 -05:00
|
|
|
#![crate_name = "foo"]
|
|
|
|
|
2022-09-09 09:18:22 -05:00
|
|
|
// @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"]' "ⓘ"
|
2023-01-26 14:32:33 -06:00
|
|
|
// @has foo/fn.bar.html '//*[@title="This example runs with edition 2018"]' "ⓘ"
|
2017-09-07 15:06:40 -05:00
|
|
|
|
|
|
|
/// foo
|
|
|
|
///
|
|
|
|
/// ```compile_fail
|
|
|
|
/// foo();
|
|
|
|
/// ```
|
|
|
|
///
|
|
|
|
/// ```ignore (tidy)
|
|
|
|
/// goo();
|
|
|
|
/// ```
|
|
|
|
///
|
2020-06-18 07:48:37 -05:00
|
|
|
/// ```should_panic
|
|
|
|
/// hoo();
|
|
|
|
/// ```
|
2020-06-18 10:45:52 -05:00
|
|
|
///
|
2020-12-05 10:31:39 -06:00
|
|
|
/// ```edition2018
|
2017-09-07 15:06:40 -05:00
|
|
|
/// let x = 0;
|
|
|
|
/// ```
|
|
|
|
pub fn bar() -> usize { 2 }
|