Skip to content

Commit 0b7da96

Browse files
committed
Improve error message on empty parens inside parse_nested_meta
1 parent 0296180 commit 0b7da96

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/meta.rs

+2
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,8 @@ fn parse_meta_path(input: ParseStream) -> Result<Path> {
401401
if input.peek(Ident::peek_any) {
402402
let ident = Ident::parse_any(input)?;
403403
segments.push_value(PathSegment::from(ident));
404+
} else if input.is_empty() {
405+
return Err(input.error("expected nested attribute"));
404406
} else if input.peek(Lit) {
405407
return Err(input.error("unexpected literal in nested attribute, expected ident"));
406408
} else {

0 commit comments

Comments
 (0)