Skip to content

Commit f3c83c5

Browse files
Add regression test to use RUSTFLAGS value in doctests
1 parent 782d228 commit f3c83c5

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

tests/rustdoc-ui/doctest/rustflags.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//@ check-pass
2+
//@ compile-flags: --test
3+
//@ rustc-env:RUSTFLAGS=--cap-lints=warn
4+
5+
/// ```
6+
/// #![deny(warnings)]
7+
/// #![feature(async_await)]
8+
///
9+
/// let x = 12;
10+
/// ```
11+
pub struct Bar;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
running 1 test
3+
test tests/rustdoc-ui/doctest/rustflags.rs - Bar (line 5) ... ok
4+
5+
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s
6+

0 commit comments

Comments
 (0)