1
Fork 0

Use parse_target_triple in rustdoc

This commit is contained in:
bjorn3 2021-05-16 15:35:10 +02:00
parent 8260b8325c
commit f22a80890a
2 changed files with 9 additions and 11 deletions

View file

@ -1507,7 +1507,10 @@ fn collect_print_requests(
prints
}
fn parse_target_triple(matches: &getopts::Matches, error_format: ErrorOutputType) -> TargetTriple {
pub fn parse_target_triple(
matches: &getopts::Matches,
error_format: ErrorOutputType,
) -> TargetTriple {
match matches.opt_str("target") {
Some(target) if target.ends_with(".json") => {
let path = Path::new(&target);