summaryrefslogtreecommitdiffstats
path: root/third_party/rust/darling/tests/compiletests.rs
blob: 00a5b3296ff02839140fa8676fb6832adcee0057 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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"
    );
}