[naga wgsl-in] Remove support for -> void return type syntax. (#6633)

This commit is contained in:
Jim Blandy 2024-12-02 09:58:59 -08:00 committed by GitHub
parent 66d51b6059
commit 246ed3ee8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2323,7 +2323,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 })