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 98a8b2b commit 9d92214Copy full SHA for 9d92214
crates/nvvm/src/lib.rs
@@ -328,15 +328,7 @@ pub enum NvvmArch {
328
329
impl Display for NvvmArch {
330
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
331
- let raw = format!("{self:?}").to_ascii_lowercase();
332
- // Handle architectures with suffixes (e.g., Compute90a -> compute_90a)
333
- if let Some(pos) = raw.find(|c: char| c.is_ascii_digit()) {
334
- let (prefix, rest) = raw.split_at(pos);
335
- write!(f, "{prefix}_{rest}")
336
- } else {
337
- // Fallback for unexpected format
338
- f.write_str(&raw)
339
- }
+ f.write_str(self.target_feature())
340
}
341
342
0 commit comments