rust/tests/run-make/rustdoc-error-lines/input.rs

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

27 lines
515 B
Rust
Raw Normal View History

2018-01-10 10:34:14 +05:30
// Test for #45868
// random #![feature] to ensure that crate attrs
// do not offset things
/// ```rust
2022-04-01 13:13:25 -04:00
/// #![feature(bool_to_option)]
2018-01-10 10:34:14 +05:30
/// let x: char = 1;
/// ```
pub fn foo() {}
/// Add some text around the test...
///
/// ```rust
2022-04-01 13:13:25 -04:00
/// #![feature(bool_to_option)]
/// let x: char = 1;
/// ```
///
/// ...to make sure that the line number is still correct.
///
/// Let's also add a second test in the same doc comment.
///
/// ```rust
2022-04-01 13:13:25 -04:00
/// #![feature(bool_to_option)]
/// let x: char = 1;
/// ```
pub fn bar() {}