Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ Pass tests are considered to succeed if they compile successfully and have a

That's the entire API.

### Conditional compilation

Trybuild sets `cfg(trybuild)` when compiling test cases. In a test case,
use `#[cfg(trybuild)]` to include code in these compilations, or
`#[cfg(not(trybuild))]` to exclude it. Trybuild does not set this cfg for
the outer test harness that calls `TestCases`.

<br>

## Workflow
Expand Down
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@
//!
//! That's the entire API.
//!
//! ## Conditional compilation
//!
//! Trybuild sets `cfg(trybuild)` when compiling test cases. In a test case,
//! use `#[cfg(trybuild)]` to include code in these compilations, or
//! `#[cfg(not(trybuild))]` to exclude it. Trybuild does not set this cfg for
//! the outer test harness that calls `TestCases`.
//!
//! <br>
//!
//! # Workflow
Expand Down
Loading