1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! Compile-fail snapshots for the mounts this crate rejects at compile time.
//!
//! Each `tests/ui/*.rs` case is a mount a service could write and must not ship, and pins the
//! compile error against a `.stderr` snapshot, so a change that lets the mount compile, or that
//! drops the fix from its message, fails the build.
//!
//! The snapshots are rustc-version-sensitive, and CI builds a floor..stable matrix, so they are
//! pinned to a single toolchain: the stable `cargo test` step sets `RUN_UI_TESTS=1`, and every
//! other run - beta, the floor, a local `cargo test` without the flag - skips. To refresh the
//! snapshots after an intentional message change, run on stable and read the diff:
//!
//! ```text
//! TRYBUILD=overwrite RUN_UI_TESTS=1 cargo test -p ruststream-zeromq --all-features --test ui
//! ```
/// Whether this run skips the snapshots, and whether skipping them is allowed.
///
/// `RUN_UI_TESTS=1` opts in. `REQUIRE_UI_TESTS=1` says a skip is not acceptable in this run: CI
/// and `just test` set it wherever they set the opt-in, so dropping or misspelling the opt-in
/// fails the run instead of leaving a green one that checked nothing.
///
/// # Panics
///
/// Panics when a run that requires the snapshots is not set up to run them.