comment on the difference between mir::ConstantKind::Unevaluated and mir::ConstantKind::Ty(ty::ConstKind::Unevaluated)
This commit is contained in:
parent
5a0a1ff0cd
commit
d14e601661
1 changed files with 5 additions and 0 deletions
|
@ -200,6 +200,11 @@ pub enum ConstantKind<'tcx> {
|
||||||
Ty(ty::Const<'tcx>),
|
Ty(ty::Const<'tcx>),
|
||||||
|
|
||||||
/// An unevaluated mir constant which is not part of the type system.
|
/// An unevaluated mir constant which is not part of the type system.
|
||||||
|
///
|
||||||
|
/// Note that `Ty(ty::ConstKind::Unevaluated)` and this variant are *not* identical! `Ty` will
|
||||||
|
/// always flow through a valtree, so all data not captured in the valtree is lost. This variant
|
||||||
|
/// directly uses the evaluated result of the given constant, including e.g. data stored in
|
||||||
|
/// padding.
|
||||||
Unevaluated(UnevaluatedConst<'tcx>, Ty<'tcx>),
|
Unevaluated(UnevaluatedConst<'tcx>, Ty<'tcx>),
|
||||||
|
|
||||||
/// This constant cannot go back into the type system, as it represents
|
/// This constant cannot go back into the type system, as it represents
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue