File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,16 @@ pub enum DefKind {
109
109
Use ,
110
110
/// An `extern` block.
111
111
ForeignMod ,
112
- /// Anonymous constant, e.g. the `1 + 2` in `[u8; 1 + 2]`
112
+ /// Anonymous constant, e.g. the `1 + 2` in `[u8; 1 + 2]`.
113
+ ///
114
+ /// Not all anon-consts are actually still relevant in the HIR. We lower
115
+ /// trivial const-arguments directly to `hir::ConstArgKind::Path`, at which
116
+ /// point the definition for the anon-const ends up unused and incomplete.
117
+ ///
118
+ /// We do not provide any a `Span` for the definition and pretty much all other
119
+ /// queries also ICE when using this `DefId`. Given that the `DefId` of such
120
+ /// constants should only be reachable by iterating all definitions of a
121
+ /// given crate, you should not have to worry about this.
113
122
AnonConst ,
114
123
/// An inline constant, e.g. `const { 1 + 2 }`
115
124
InlineConst ,
You can’t perform that action at this time.
0 commit comments