Skip to content
Snippets Groups Projects
Commit 2272227e authored by Jorge Aparicio's avatar Jorge Aparicio
Browse files

types can't contain a semicolon

parent dc0cf214
No related branches found
No related tags found
No related merge requests found
......@@ -234,6 +234,12 @@ fn static_(tts: &mut Iter<TokenTree>) -> Result<Static> {
if let Some(tt) = tts.next() {
if tt == &TokenTree::Token(Token::Eq) {
break;
} else if tt == &TokenTree::Token(Token::Semi) {
fragments.push(tt);
bail!(
"expected a type, found Semicolon: `{}`",
quote!(#(#fragments)*)
);
} else {
fragments.push(tt);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment