mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Fix mbe fail to pass expr with attr
This commit is contained in:
parent
1d530756ed
commit
710407b11d
2 changed files with 13 additions and 1 deletions
|
@ -760,6 +760,18 @@ fn test_last_expr() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_expr_with_attr() {
|
||||||
|
parse_macro(
|
||||||
|
r#"
|
||||||
|
macro_rules! m {
|
||||||
|
($a:expr) => {0}
|
||||||
|
}
|
||||||
|
"#,
|
||||||
|
)
|
||||||
|
.assert_expand_items("m!(#[allow(a)]())", "0");
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_ty() {
|
fn test_ty() {
|
||||||
parse_macro(
|
parse_macro(
|
||||||
|
|
|
@ -59,7 +59,7 @@ pub(crate) mod fragments {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub(crate) fn expr(p: &mut Parser) {
|
pub(crate) fn expr(p: &mut Parser) {
|
||||||
let _ = expressions::expr(p);
|
let _ = expressions::expr_with_attrs(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn stmt(p: &mut Parser) {
|
pub(crate) fn stmt(p: &mut Parser) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue