We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
NvvmArch::fmt
1 parent 6bcc887 commit db485c2Copy full SHA for db485c2
crates/nvvm/src/lib.rs
@@ -325,15 +325,7 @@ pub enum NvvmArch {
325
326
impl Display for NvvmArch {
327
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
328
- let raw = format!("{self:?}").to_ascii_lowercase();
329
- // Handle architectures with suffixes (e.g., Compute90a -> compute_90a)
330
- if let Some(pos) = raw.find(|c: char| c.is_ascii_digit()) {
331
- let (prefix, rest) = raw.split_at(pos);
332
- write!(f, "{prefix}_{rest}")
333
- } else {
334
- // Fallback for unexpected format
335
- f.write_str(&raw)
336
- }
+ f.write_str(self.target_feature())
337
}
338
339
0 commit comments