Skip to content

Commit

Permalink
Add regression test to use RUSTFLAGS value in doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Aug 7, 2024
1 parent 782d228 commit f3c83c5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/rustdoc-ui/doctest/rustflags.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//@ check-pass
//@ compile-flags: --test
//@ rustc-env:RUSTFLAGS=--cap-lints=warn

/// ```
/// #![deny(warnings)]
/// #![feature(async_await)]
///
/// let x = 12;
/// ```
pub struct Bar;
6 changes: 6 additions & 0 deletions tests/rustdoc-ui/doctest/rustflags.stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

running 1 test
test tests/rustdoc-ui/doctest/rustflags.rs - Bar (line 5) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s

0 comments on commit f3c83c5

Please sign in to comment.