mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
clippy fixes
This commit is contained in:
@@ -642,6 +642,7 @@ impl super::Instruction {
|
||||
//
|
||||
// Ray Query Instructions
|
||||
//
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(super) fn ray_query_initialize(
|
||||
query: Word,
|
||||
acceleration_structure: Word,
|
||||
|
||||
@@ -234,8 +234,7 @@ impl<'a> ExpressionContext<'a, '_, '_> {
|
||||
/// [`self.resolved_inner(handle)`]: ExpressionContext::resolved_inner
|
||||
/// [`Typifier`]: Typifier
|
||||
fn grow_types(&mut self, handle: Handle<crate::Expression>) -> Result<&mut Self, Error<'a>> {
|
||||
let resolve_ctx =
|
||||
ResolveContext::with_locals(&self.module, self.local_vars, self.arguments);
|
||||
let resolve_ctx = ResolveContext::with_locals(self.module, self.local_vars, self.arguments);
|
||||
self.typifier
|
||||
.grow(handle, self.naga_expressions, &resolve_ctx)
|
||||
.map_err(Error::InvalidResolve)?;
|
||||
|
||||
@@ -169,6 +169,7 @@ need to be stored in a local variable to be carried upwards in the statement
|
||||
tree.
|
||||
|
||||
[`AtomicResult`]: Expression::AtomicResult
|
||||
[`RayQueryProceedResult`]: Expression::RayQueryProceedResult
|
||||
[`CallResult`]: Expression::CallResult
|
||||
[`Constant`]: Expression::Constant
|
||||
[`Derivative`]: Expression::Derivative
|
||||
|
||||
@@ -209,7 +209,7 @@ pub struct ResolveContext<'a> {
|
||||
|
||||
impl<'a> ResolveContext<'a> {
|
||||
/// Initialize a resolve context from the module.
|
||||
pub fn with_locals(
|
||||
pub const fn with_locals(
|
||||
module: &'a crate::Module,
|
||||
local_vars: &'a Arena<crate::LocalVariable>,
|
||||
arguments: &'a [crate::FunctionArgument],
|
||||
|
||||
@@ -205,7 +205,7 @@ impl TypeInfo {
|
||||
}
|
||||
|
||||
impl super::Validator {
|
||||
fn require_type_capability(&self, capability: Capabilities) -> Result<(), TypeError> {
|
||||
const fn require_type_capability(&self, capability: Capabilities) -> Result<(), TypeError> {
|
||||
if self.capabilities.contains(capability) {
|
||||
Ok(())
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user