2020-05-09 18:25:30 -05:00
|
|
|
//@ aux-build:multispan.rs
|
2023-12-21 03:44:43 -06:00
|
|
|
//@ error-pattern:hello to you, too!
|
2021-02-28 12:24:46 -06:00
|
|
|
//@ compile-flags: --error-format human-annotate-rs -Z unstable-options
|
2020-05-09 18:25:30 -05:00
|
|
|
|
|
|
|
#![feature(proc_macro_hygiene)]
|
|
|
|
|
|
|
|
extern crate multispan;
|
|
|
|
|
|
|
|
use multispan::hello;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
// This one emits no error.
|
|
|
|
hello!();
|
|
|
|
|
|
|
|
// Exactly one 'hi'.
|
2023-12-21 03:44:43 -06:00
|
|
|
hello!(hi);
|
2020-05-09 18:25:30 -05:00
|
|
|
|
|
|
|
// Now two, back to back.
|
2023-12-21 03:44:43 -06:00
|
|
|
hello!(hi hi);
|
2020-05-09 18:25:30 -05:00
|
|
|
|
|
|
|
// Now three, back to back.
|
2023-12-21 03:44:43 -06:00
|
|
|
hello!(hi hi hi);
|
2020-05-09 18:25:30 -05:00
|
|
|
|
|
|
|
// Now several, with spacing.
|
2023-12-21 03:44:43 -06:00
|
|
|
hello!(hi hey hi yo hi beep beep hi hi);
|
|
|
|
hello!(hi there, hi how are you? hi... hi.);
|
|
|
|
hello!(whoah. hi di hi di ho);
|
|
|
|
hello!(hi good hi and good bye);
|
2020-05-09 18:25:30 -05:00
|
|
|
}
|