File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -228,17 +228,16 @@ impl<'hir> PathSegment<'hir> {
228
228
}
229
229
}
230
230
231
- /// A constant that enters the type system, e.g. through const generics or even
232
- /// array lengths.
231
+ /// A constant that enters the type system, used for arguments to const generics (e.g. array lengths).
233
232
///
234
- /// These are distinct from [`AnonConst`] in part because with the plan for
235
- /// `min_generic_const_args`, arbitrary anonymous constants (like `Foo<{N + 1}>`)
236
- /// will *not* be allowed to use generic parameters. Instead, it will be necessary
237
- /// to add indirection using a free constant that itself has const parameters .
233
+ /// These are distinct from [`AnonConst`] as anon consts in the type system are not allowed
234
+ /// to use any generic parameters, therefore we must represent `N` differently. Additionally
235
+ /// future designs for supporting generic parameters in const arguments will likely not use
236
+ /// an anon const based design .
238
237
///
239
238
/// So, `ConstArg` (specifically, [`ConstArgKind`]) distinguishes between const args
240
239
/// that are [just paths](ConstArgKind::Path) (currently just bare const params)
241
- /// versus const args that are literals or have arbitrary computations (e.g., `{ 1 + 3}`).
240
+ /// versus const args that are literals or have arbitrary computations (e.g., `{ 1 + 3 }`).
242
241
#[ derive( Clone , Copy , Debug , HashStable_Generic ) ]
243
242
pub struct ConstArg < ' hir > {
244
243
#[ stable_hasher( ignore) ]
You can’t perform that action at this time.
0 commit comments