diff options
Diffstat (limited to 'vendor/darling/tests/compiletests.rs')
-rw-r--r-- | vendor/darling/tests/compiletests.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/darling/tests/compiletests.rs b/vendor/darling/tests/compiletests.rs new file mode 100644 index 000000000..00a5b3296 --- /dev/null +++ b/vendor/darling/tests/compiletests.rs @@ -0,0 +1,16 @@ +#![cfg(compiletests)] + +#[rustversion::stable(1.65)] +#[test] +fn compile_test() { + let t = trybuild::TestCases::new(); + t.compile_fail("tests/compile-fail/*.rs"); +} + +#[rustversion::not(stable(1.65))] +#[test] +fn wrong_rustc_version() { + panic!( + "This is not the expected version of rustc. Error messages vary across compiler versions so tests may produce spurious errors" + ); +} |