mirror of
https://gitee.com/openharmony/third_party_rust_proc-macro-error
synced 2024-11-23 07:30:04 +00:00
14 lines
321 B
Rust
14 lines
321 B
Rust
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");
|
|
}
|