Skip to content

Commit b3d996c

Browse files
committed
[naga] Various doc fixes.
1 parent cde891a commit b3d996c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

naga/src/front/wgsl/lower/conversion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl<'source> super::ExpressionContext<'source, '_, '_> {
7171
self.convert_leaf_scalar(expr, expr_span, goal_scalar)
7272
}
7373

74-
/// Try to convert `expr`'s leaf scalar to `goal` using automatic conversions.
74+
/// Try to convert `expr`'s leaf scalar to `goal_scalar` using automatic conversions.
7575
///
7676
/// If no conversions are necessary, return `expr` unchanged.
7777
///

naga/src/proc/type_methods.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ impl crate::TypeInner {
102102
///
103103
/// If `inner` is a scalar, vector, or matrix type, return
104104
/// its scalar type. Otherwise, return `None`.
105+
///
106+
/// Note that this doesn't inspect [`Array`] types, as required
107+
/// for automatic conversions. For that, see [`scalar_for_conversions`].
108+
///
109+
/// [`Array`]: crate::TypeInner::Array
110+
/// [`scalar_for_conversions`]: crate::TypeInner::scalar_for_conversions
105111
pub const fn scalar(&self) -> Option<crate::Scalar> {
106112
use crate::TypeInner as Ti;
107113
match *self {

0 commit comments

Comments
 (0)