mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-20 23:28:23 +02:00
panfrost: Set the rustfmt edition to 2024
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42189>
This commit is contained in:
parent
0675ce49c5
commit
b4e58c2bdb
7 changed files with 12 additions and 12 deletions
|
|
@ -1 +1,3 @@
|
|||
edition = "2024"
|
||||
style_edition = "2024"
|
||||
max_width = 80
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ impl XmlElement {
|
|||
name,
|
||||
attributes,
|
||||
&mut events,
|
||||
)
|
||||
);
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue