panfrost: Set the rustfmt edition to 2024

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42189>
This commit is contained in:
Faith Ekstrand 2026-06-15 23:19:17 -04:00 committed by Marge Bot
parent 0675ce49c5
commit b4e58c2bdb
7 changed files with 12 additions and 12 deletions

View file

@ -1 +1,3 @@
edition = "2024"
style_edition = "2024"
max_width = 80

View file

@ -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 }
}

View file

@ -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 {

View file

@ -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)

View file

@ -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 {

View file

@ -68,7 +68,7 @@ mod result {
pub type Result<T> = std::result::Result<T, Error>;
}
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<u8> {
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 {

View file

@ -72,7 +72,7 @@ impl XmlElement {
name,
attributes,
&mut events,
)
);
}
_ => (),
}