That function starts at depth 0, meaning it tries to check modules whether module.part(0) is equal to something, which panics, as that vector is empty:
let modident = entries[0].part(depth);
let matching: Vec<&Module> = entries
.iter()
.filter(|&v| v.part(depth) == modident)
.copied()
.collect();
a simple .proto file with no package will result in a Module object with an empty vector.
However, the following code is called 1035 in lib.rs of prost-build:
That function starts at depth 0, meaning it tries to check modules whether
module.part(0)
is equal to something, which panics, as that vector is empty: