Skip to content

Commit

Permalink
Improve doc comment of destructure_const
Browse files Browse the repository at this point in the history
  • Loading branch information
voidc committed Jun 29, 2022
1 parent 053f48d commit d048b15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion compiler/rustc_middle/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ty_utils/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down

0 comments on commit d048b15

Please sign in to comment.