]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/macro-nested_expr.rs
Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, r=petrochenkov
[rust.git] / tests / ui / macros / macro-nested_expr.rs
1 // run-pass
2 // #42164
3
4 #![feature(decl_macro)]
5 #![allow(dead_code)]
6
7 pub macro m($inner_str:expr) {
8     #[doc = $inner_str]
9     struct S;
10 }
11
12 macro_rules! define_f {
13     ($name:expr) => {
14         #[export_name = $name]
15         fn f() {}
16     }
17 }
18
19 fn main() {
20     define_f!(concat!("exported_", "f"));
21     m!(stringify!(foo));
22 }