Skip to content

Commit f6e22b4

Browse files
committed
fix warnings
1 parent 2220ab1 commit f6e22b4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/rustc_codegen_spirv/src/spirv_type.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,12 @@ impl SpirvType<'_> {
185185
let result = cx
186186
.emit_global()
187187
.type_array_id(id, element, count.def_cx(cx));
188-
self.decorate_array_stride(result, element, cx);
188+
Self::decorate_array_stride(result, element, cx);
189189
result
190190
}
191191
Self::RuntimeArray { element } => {
192192
let result = cx.emit_global().type_runtime_array_id(id, element);
193-
self.decorate_array_stride(result, element, cx);
193+
Self::decorate_array_stride(result, element, cx);
194194
result
195195
}
196196
Self::Pointer { pointee } => {
@@ -258,7 +258,7 @@ impl SpirvType<'_> {
258258
result
259259
}
260260

261-
fn decorate_array_stride(self, result: u32, element: u32, cx: &CodegenCx<'_>) {
261+
fn decorate_array_stride(result: u32, element: u32, cx: &CodegenCx<'_>) {
262262
let mut emit = cx.emit_global();
263263
let ty = cx.lookup_type(element);
264264
if let Some(element_size) = ty.physical_size(cx) {
@@ -380,12 +380,12 @@ impl SpirvType<'_> {
380380
}
381381

382382
/// Get the physical size of the type needed for explicit layout decorations.
383+
#[allow(clippy::match_same_arms)]
383384
pub fn physical_size(&self, cx: &CodegenCx<'_>) -> Option<Size> {
384385
match *self {
385386
// TODO(jwollen) Handle physical pointers (PhysicalStorageBuffer)
386387
Self::Pointer { .. } => None,
387388

388-
// TODO(jwollen) Handle unsized elements
389389
Self::Adt { size, .. } => size,
390390

391391
Self::Array { element, count } => Some(

0 commit comments

Comments
 (0)