1 // Regression tests for issue #55414, expansion happens in the value of a key-value attribute,
2 // and the expanded expression is more complex than simply a macro call.
4 // aux-build:key-value-expansion.rs
6 #![feature(rustc_attrs)]
8 extern crate key_value_expansion;
10 // Minimized test case.
14 #[rustc_dummy = $expr] // Any key-value attribute, not necessarily `doc`
19 // Any expressions containing macro call `X` that's more complex than `X` itself.
20 // Parentheses will work.
21 bug!((column!())); //~ ERROR unexpected expression: `(7u32)`
23 // Original test case.
27 bug!("bug" + stringify!(found)); //~ ERROR unexpected expression: `"bug" + "found"`
37 // Test case from #66804.
39 macro_rules! doc_comment {
46 macro_rules! some_macro {
48 doc_comment! {format!("{coor}", coor = stringify!($t1)).as_str()}
49 //~^ ERROR unexpected expression: `{