diff options
| author | Dominik Stolz <d.stolz@tum.de> | 2022-06-29 10:30:47 +0200 |
|---|---|---|
| committer | Dominik Stolz <d.stolz@tum.de> | 2022-06-29 10:30:47 +0200 |
| commit | d048b15216a14711b386ac5322cf24583df5ed3d (patch) | |
| tree | 85e21e2e925aa1e49de0efacb46e827a7771196b | |
| parent | 053f48d91f3529a3aa1c82a1e96e9b77ef7edf30 (diff) | |
| download | rust-d048b15216a14711b386ac5322cf24583df5ed3d.tar.gz rust-d048b15216a14711b386ac5322cf24583df5ed3d.zip | |
Improve doc comment of destructure_const
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_ty_utils/src/consts.rs | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index b07916d3bbc..a1065eef850 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -978,7 +978,8 @@ rustc_queries! { desc { "converting type-level constant value to mir constant value"} } - /// Destructure a type-level constant ADT or array into its variant index and its field values. + /// Destructures array, ADT or tuple constants into the constants + /// of their fields. query destructure_const(key: ty::Const<'tcx>) -> ty::DestructuredConst<'tcx> { desc { "destructuring type level constant"} } diff --git a/compiler/rustc_ty_utils/src/consts.rs b/compiler/rustc_ty_utils/src/consts.rs index 5f7cafe2722..0b83cdb78dc 100644 --- a/compiler/rustc_ty_utils/src/consts.rs +++ b/compiler/rustc_ty_utils/src/consts.rs @@ -3,8 +3,8 @@ use rustc_target::abi::VariantIdx; use std::iter; -/// Tries to destructure array, ADT or tuple constants into the constants -/// of its fields. +/// Destructures array, ADT or tuple constants into the constants +/// of their fields. pub(crate) fn destructure_const<'tcx>( tcx: TyCtxt<'tcx>, const_: ty::Const<'tcx>, |
