Improve doc comment of destructure_const

This commit is contained in:
Dominik Stolz 2022-06-29 10:30:47 +02:00
parent 053f48d91f
commit d048b15216
2 changed files with 4 additions and 3 deletions

View File

@ -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"}
}

View File

@ -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>,