Debian Codegraph @

third_party/rust/darling/tests/compiletests.rs

raw
1 #![cfg(compiletests)]
2
3 #[rustversion::stable(1.77)]
4 #[test]
5 fn compile_test() {
6 let t = trybuild::TestCases::new();
7 t.compile_fail("tests/compile-fail/*.rs");
8 }
9
10 #[rustversion::not(stable(1.77))]
11 #[test]
12 fn wrong_rustc_version() {
13 panic!(
14 "This is not the expected version of rustc. Error messages vary across compiler versions so tests may produce spurious errors"
15 );
16 }