Provide a better error when parsing a module fails.

I was hitting this today :)
This commit is contained in:
Emilio Cobos Álvarez 2018-08-09 01:04:08 +02:00 committed by Ryan Hunt
parent dc558ecf2c
commit 8b4a271714

View File

@ -281,7 +281,7 @@ impl Parser {
let i = syn::parse_file(&s).map_err(|x| Error::ParseSyntaxError {
crate_name: pkg.name.clone(),
src_path: "".to_owned(),
src_path: owned_mod_path.to_string_lossy().into(),
error: x,
})?;