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 2022-04-25 23:31:10 -05:00 committed by GitHub
parent 1aa9154964
commit 9b7fe8803d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {