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.

29 lines
517 B
Rust
Raw Normal View History

2018-01-09 23:04:14 -06:00
// Test for #45868
// random #![feature] to ensure that crate attrs
// do not offset things
/// ```rust
2022-04-01 12:13:25 -05:00
/// #![feature(bool_to_option)]
2018-01-09 23:04:14 -06:00
/// let x: char = 1;
/// ```
pub fn foo() {
}
/// Add some text around the test...
///
/// ```rust
2022-04-01 12:13:25 -05: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 12:13:25 -05:00
/// #![feature(bool_to_option)]
/// let x: char = 1;
/// ```
pub fn bar() {}