Rocket/core/codegen/tests/ui-fail.rs
Sergio Benitez 793f421712 Support type generics, unit structs in 'FromForm'.
The 'FromFrom' derive now allows type generics in all positions using
the same automatic discovery technique as with 'Responder'. (In fact,
the technique was created for this derive.) Furthermore, 'FromForm' can
now be derived for unit structs.

Also adds a new 'try_with' form field validator.

Resolves #1695.
2021-06-29 03:37:52 -07:00

15 lines
383 B
Rust

#[test]
fn ui() {
let path = match version_check::is_feature_flaggable() {
Some(true) => "ui-fail-nightly",
_ => "ui-fail-stable"
};
let glob = std::env::args().last()
.map(|arg| format!("*{}*.rs", arg))
.unwrap_or_else(|| "*.rs".into());
let t = trybuild::TestCases::new();
t.compile_fail(format!("tests/{}/{}", path, glob));
}