Skip to content

Commit 5a6e30b

Browse files
committed
check_html_root_url: use parse_file to handle files with #!
1 parent 63d6564 commit 5a6e30b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/html_root_url.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub fn check_html_root_url(path: &str, pkg_name: &str, pkg_version: &str) -> Res
7272
let code = read_file(path).map_err(|err| format!("could not read {}: {}", path, err))?;
7373
let version = parse_version(pkg_version)
7474
.map_err(|err| format!("bad package version {:?}: {}", pkg_version, err))?;
75-
let krate: syn::File = syn::parse_str(&code)
75+
let krate: syn::File = syn::parse_file(&code)
7676
.map_err(|_| format!("could not parse {}: please run \"cargo build\"", path))?;
7777

7878
println!("Checking doc attributes in {}...", path);

0 commit comments

Comments
 (0)