Skip to content

Commit

Permalink
Ensure target is always three components
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky committed Apr 9, 2021
1 parent 45e9561 commit c8feb80
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/rustc_codegen_spirv/src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ impl std::str::FromStr for SpirvTarget {
.next()
.and_then(|env| env.parse().ok())
.ok_or_else(error)?;

if iter.next().is_some() {
return Err(error());
}

Ok(Self { env, vendor })
}
}
Expand Down

0 comments on commit c8feb80

Please sign in to comment.