We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a0a1ff commit d14e601Copy full SHA for d14e601
compiler/rustc_middle/src/mir/consts.rs
@@ -200,6 +200,11 @@ pub enum ConstantKind<'tcx> {
200
Ty(ty::Const<'tcx>),
201
202
/// An unevaluated mir constant which is not part of the type system.
203
+ ///
204
+ /// Note that `Ty(ty::ConstKind::Unevaluated)` and this variant are *not* identical! `Ty` will
205
+ /// always flow through a valtree, so all data not captured in the valtree is lost. This variant
206
+ /// directly uses the evaluated result of the given constant, including e.g. data stored in
207
+ /// padding.
208
Unevaluated(UnevaluatedConst<'tcx>, Ty<'tcx>),
209
210
/// This constant cannot go back into the type system, as it represents
0 commit comments