From d048b15216a14711b386ac5322cf24583df5ed3d Mon Sep 17 00:00:00 2001 From: Dominik Stolz Date: Wed, 29 Jun 2022 10:30:47 +0200 Subject: [PATCH] Improve doc comment of destructure_const --- compiler/rustc_middle/src/query/mod.rs | 3 ++- 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 b07916d3bbc5..a1065eef8509 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 5f7cafe2722f..0b83cdb78dce 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>,