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