summaryrefslogtreecommitdiffstats
path: root/third_party/rust/proc-macro-error/tests/runtime-errors.rs
blob: 13108a2d917d8abe00fd4e51b54212e2b03b9735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use proc_macro_error::*;

#[test]
#[should_panic = "proc-macro-error API cannot be used outside of"]
fn missing_attr_emit() {
    emit_call_site_error!("You won't see me");
}

#[test]
#[should_panic = "proc-macro-error API cannot be used outside of"]
fn missing_attr_abort() {
    abort_call_site!("You won't see me");
}