Clarify accepted types for Expression::AccessIndex (#1862)

* Clarify accepted types for `AccessIndex` and remove `Constant` fragment

* Remove spaces

Will I ever learn to run `cargo fmt`  before pushing? The answer is probably yes, after this repeated embarrassment
This commit is contained in:
Noel Tautges authored and GitHub committed 2022-04-25 21:31:10 -07:00
1 parent 1aa9154964
commit 9b7fe8803d
1 file changed
+4 -3
+4 -3
View File
@@ -1108,14 +1108,15 @@ pub enum Expression {
base: Handle<Expression>,
index: Handle<Expression>,
},
/// Array access with a known index.
/// Access the same types as [`Access`], plus [`Struct`] with a known index.
///
/// [`Access`]: Expression::Access
/// [`Struct`]: TypeInner::Struct
AccessIndex {
base: Handle<Expression>,
index: u32,
},
/// Constant value.
///
/// Every `Constant` expression
Constant(Handle<Constant>),
/// Splat scalar into a vector.
Splat {