template-quote 0.5.0

A new-fashioned quote! macro implementation with pretty template-engine-like syntax
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Compile-fail (UI) tests for the macros' diagnostics. The expected output
//! lives in the sibling `tests/ui/*.stderr` files; regenerate them after an
//! intentional message change with `TRYBUILD=overwrite cargo test --test ui`.
//!
//! Note: `.stderr` rendering is rustc-version-sensitive, so these are gated to
//! run only under the toolchain they were captured on (set `RUN_UI_TESTS=1`).
#[test]
fn ui() {
	if std::env::var_os("RUN_UI_TESTS").is_none() {
		eprintln!("skipping UI tests; set RUN_UI_TESTS=1 to run (rustc-version sensitive)");
		return;
	}
	let t = trybuild::TestCases::new();
	t.compile_fail("tests/ui/*.rs");
}