diff --git a/src/panfrost/.rustfmt.toml b/src/panfrost/.rustfmt.toml index df99c69198f..bb0e8e57e39 100644 --- a/src/panfrost/.rustfmt.toml +++ b/src/panfrost/.rustfmt.toml @@ -1 +1,3 @@ +edition = "2024" +style_edition = "2024" max_width = 80 diff --git a/src/panfrost/compiler/kraid/model.rs b/src/panfrost/compiler/kraid/model.rs index cadb3b10874..da48d773873 100644 --- a/src/panfrost/compiler/kraid/model.rs +++ b/src/panfrost/compiler/kraid/model.rs @@ -39,7 +39,7 @@ struct ValhallModel { impl ValhallModel { fn new(arch: u8) -> ValhallModel { - use crate::isa::{v9, SmallConstantTable}; + use crate::isa::{SmallConstantTable, v9}; let sc_table = v9::SmallConstantT::collect(arch); ValhallModel { arch, sc_table } } diff --git a/src/panfrost/compiler/kraid/ops.rs b/src/panfrost/compiler/kraid/ops.rs index 3d72b9d938e..8d5d2ccf692 100644 --- a/src/panfrost/compiler/kraid/ops.rs +++ b/src/panfrost/compiler/kraid/ops.rs @@ -3,7 +3,7 @@ use crate::data_type::PartialDataType; use crate::ir::*; -use kraid_proc_macros::{variants, FromVariants, Opcode}; +use kraid_proc_macros::{FromVariants, Opcode, variants}; use std::fmt; macro_rules! bool_as_mod_str { diff --git a/src/panfrost/compiler/kraid/proc/isa/encoder.rs b/src/panfrost/compiler/kraid/proc/isa/encoder.rs index 54951bf6adc..f7972e7393a 100644 --- a/src/panfrost/compiler/kraid/proc/isa/encoder.rs +++ b/src/panfrost/compiler/kraid/proc/isa/encoder.rs @@ -271,8 +271,10 @@ fn map_field_src( (SrcType::Src, SrcField::SrcSwizzle) } else if DST_LANES_ENUMS.iter().any(|e| field_type.is_enum(e)) { if !sr_control.has_write() { - assert!(["lane", "dest_width", "dest_width_narrow"] - .contains(&field_name)); + assert!( + ["lane", "dest_width", "dest_width_narrow"] + .contains(&field_name) + ); (SrcType::Dst, SrcField::DstLanes) } else { (SrcType::from_field_type(field_type), SrcField::Direct) diff --git a/src/panfrost/compiler/kraid/proc/isa/enums.rs b/src/panfrost/compiler/kraid/proc/isa/enums.rs index a34a632a96d..28734ec73f3 100644 --- a/src/panfrost/compiler/kraid/proc/isa/enums.rs +++ b/src/panfrost/compiler/kraid/proc/isa/enums.rs @@ -7,7 +7,7 @@ use crate::isa::*; use proc_macro2::TokenStream as TokenStream2; use proc_macro2::{Ident, Span}; use std::cell::OnceCell; -use std::collections::{btree_map, BTreeMap, HashSet}; +use std::collections::{BTreeMap, HashSet, btree_map}; use std::rc::{Rc, Weak}; pub struct EnumValue { diff --git a/src/panfrost/compiler/kraid/proc/isa/mod.rs b/src/panfrost/compiler/kraid/proc/isa/mod.rs index c4566d631aa..9caa74f2432 100644 --- a/src/panfrost/compiler/kraid/proc/isa/mod.rs +++ b/src/panfrost/compiler/kraid/proc/isa/mod.rs @@ -68,7 +68,7 @@ mod result { pub type Result = std::result::Result; } -pub use result::{err, Error, Result}; +pub use result::{Error, Result, err}; pub fn is_data_type_name(s: &str) -> bool { let mut s = s.as_bytes(); @@ -169,11 +169,7 @@ impl ArchSet { pub fn first(&self) -> Option { let first = self.bits.trailing_zeros(); - if first < 32 { - Some(first as u8) - } else { - None - } + if first < 32 { Some(first as u8) } else { None } } pub fn insert(&mut self, arch: u8) -> bool { diff --git a/src/panfrost/compiler/kraid/proc/isa/xml.rs b/src/panfrost/compiler/kraid/proc/isa/xml.rs index 60d294b5368..dd349aed290 100644 --- a/src/panfrost/compiler/kraid/proc/isa/xml.rs +++ b/src/panfrost/compiler/kraid/proc/isa/xml.rs @@ -72,7 +72,7 @@ impl XmlElement { name, attributes, &mut events, - ) + ); } _ => (), }