File: runtime-errors.rs

package info (click to toggle)
rust-proc-macro-error2 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 308 kB
  • sloc: makefile: 2
file content (13 lines) | stat: -rw-r--r-- 324 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
use proc_macro_error2::*;

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

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