diff --git a/naga/src/front/wgsl/parse/mod.rs b/naga/src/front/wgsl/parse/mod.rs index 93b9343324..ca175d02a6 100644 --- a/naga/src/front/wgsl/parse/mod.rs +++ b/naga/src/front/wgsl/parse/mod.rs @@ -2267,7 +2267,7 @@ impl Parser { ready = lexer.skip(Token::Separator(',')); } // read return type - let result = if lexer.skip(Token::Arrow) && !lexer.skip(Token::Word("void")) { + let result = if lexer.skip(Token::Arrow) { let binding = self.varying_binding(lexer, &mut ctx)?; let ty = self.type_decl(lexer, &mut ctx)?; Some(ast::FunctionResult { ty, binding })