There was an error while loading. Please reload this page.
1 parent 037861a commit 31e8632Copy full SHA for 31e8632
src/item.rs
@@ -1411,14 +1411,16 @@ pub(crate) mod parsing {
1411
&content,
1412
allow_crate_root_in_path && !this_tree_starts_with_crate_root,
1413
)? {
1414
- Some(tree) => items.push_value(tree),
1415
- None => has_any_crate_root_in_path = true,
+ Some(tree) if !has_any_crate_root_in_path => items.push_value(tree),
+ _ => has_any_crate_root_in_path = true,
1416
}
1417
if content.is_empty() {
1418
break;
1419
1420
let comma: Token![,] = content.parse()?;
1421
- items.push_punct(comma);
+ if !has_any_crate_root_in_path {
1422
+ items.push_punct(comma);
1423
+ }
1424
1425
if has_any_crate_root_in_path {
1426
Ok(None)
0 commit comments