This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 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> {
228228 }
229229}
230230
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).
233232///
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 .
238237///
239238/// So, `ConstArg` (specifically, [`ConstArgKind`]) distinguishes between const args
240239/// 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 }`).
242241#[ derive( Clone , Copy , Debug , HashStable_Generic ) ]
243242pub struct ConstArg < ' hir > {
244243 #[ stable_hasher( ignore) ]
You can’t perform that action at this time.
0 commit comments