diff --git a/src/stmt.rs b/src/stmt.rs index 100a474d79..bab913fe9c 100644 --- a/src/stmt.rs +++ b/src/stmt.rs @@ -158,7 +158,11 @@ pub mod parsing { // expression statements. let ahead = input.fork(); if let Ok(path) = ahead.call(Path::parse_mod_style) { - if ahead.peek(Token![!]) && (ahead.peek2(token::Brace) || ahead.peek2(Ident)) { + if ahead.peek(Token![!]) + && (ahead.peek2(token::Brace) + && !(ahead.peek3(Token![.]) || ahead.peek3(Token![?])) + || ahead.peek2(Ident)) + { input.advance_to(&ahead); return stmt_mac(input, attrs, path); } diff --git a/tests/repo/mod.rs b/tests/repo/mod.rs index 496f534839..1176620c11 100644 --- a/tests/repo/mod.rs +++ b/tests/repo/mod.rs @@ -12,10 +12,6 @@ const REVISION: &str = "ac2d9fc509e36d1b32513744adf58c34bcc4f43c"; #[rustfmt::skip] static EXCLUDE: &[&str] = &[ - // TODO: dot after curly braced macro call: macro!{...}.field - // https://github.com/dtolnay/syn/issues/1068 - "src/test/ui/parser/macro-braces-dot-question.rs", - // TODO: impl ~const T {} // https://github.com/dtolnay/syn/issues/1051 "src/test/ui/rfc-2632-const-trait-impl/syntax.rs",