mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-28 09:09:19 +01:00
remove next_scalar_generic
This commit is contained in:
1 parent
6bcf0f2d28
commit
21972dd38f
2 files changed
+1
-17
No files matched your search
@@ -519,22 +519,6 @@ impl<'a> Lexer<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Parses a generic scalar type, for example `<f32>`.
|
||||
pub(in crate::front::wgsl) fn next_scalar_generic(&mut self) -> Result<'a, Scalar> {
|
||||
self.expect_generic_paren('<')?;
|
||||
let (scalar, _span) = match self.next() {
|
||||
(Token::Word(word), span) => {
|
||||
conv::get_scalar_type(&self.enable_extensions, span, word)?
|
||||
.map(|scalar| (scalar, span))
|
||||
.ok_or(Error::UnknownScalarType(span))?
|
||||
}
|
||||
(_, span) => return Err(Box::new(Error::UnknownScalarType(span))),
|
||||
};
|
||||
|
||||
self.expect_generic_paren('>')?;
|
||||
Ok(scalar)
|
||||
}
|
||||
|
||||
/// Parses a generic scalar type, for example `<f32>`.
|
||||
///
|
||||
/// Returns the span covering the inner type, excluding the brackets.
|
||||
|
||||
@@ -1784,7 +1784,7 @@ impl Parser {
|
||||
)?
|
||||
}
|
||||
"atomic" => {
|
||||
let scalar = lexer.next_scalar_generic()?;
|
||||
let (scalar, _) = lexer.next_scalar_generic_with_span()?;
|
||||
ast::Type::Atomic(scalar)
|
||||
}
|
||||
"ptr" => {
|
||||
|
||||
Reference in new issue
Block a user