]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/hygiene_example.rs
Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyup
[rust.git] / tests / ui / proc-macro / hygiene_example.rs
1 // check-pass
2 // aux-build:hygiene_example_codegen.rs
3 // aux-build:hygiene_example.rs
4
5 extern crate hygiene_example;
6 use hygiene_example::hello;
7
8 fn main() {
9     mod hygiene_example {} // no conflict with `extern crate hygiene_example;` from the proc macro
10     macro_rules! format { () => {} } // does not interfere with `format!` from the proc macro
11     macro_rules! hello_helper { () => {} } // similarly does not intefere with the proc macro
12
13     let string = "world"; // no conflict with `string` from the proc macro
14     hello!(string);
15     hello!(string);
16 }