Skip to content

Commit 39f92c2

Browse files
committed
Auto merge of #98091 - Dylan-DPC:rollup-ueb6b5x, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - #97869 (BTree: tweak internal comments) - #97935 (Rename the `ConstS::val` field as `kind`.) - #97948 (lint: add diagnostic translation migration lints) - #98042 (Fix compat_fn option method on miri) - #98069 (rustdoc: remove link on slice brackets) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 274b5e0 + 281dcae commit 39f92c2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clippy_lints/src/large_const_arrays.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl<'tcx> LateLintPass<'tcx> for LargeConstArrays {
5353
if let ItemKind::Const(hir_ty, _) = &item.kind;
5454
let ty = hir_ty_to_ty(cx.tcx, hir_ty);
5555
if let ty::Array(element_type, cst) = ty.kind();
56-
if let ConstKind::Value(ConstValue::Scalar(element_count)) = cst.val();
56+
if let ConstKind::Value(ConstValue::Scalar(element_count)) = cst.kind();
5757
if let Ok(element_count) = element_count.to_machine_usize(&cx.tcx);
5858
if let Ok(element_size) = cx.layout_of(*element_type).map(|l| l.size.bytes());
5959
if self.maximum_allowed_size < element_count * element_size;

clippy_lints/src/large_stack_arrays.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl<'tcx> LateLintPass<'tcx> for LargeStackArrays {
4343
if_chain! {
4444
if let ExprKind::Repeat(_, _) = expr.kind;
4545
if let ty::Array(element_type, cst) = cx.typeck_results().expr_ty(expr).kind();
46-
if let ConstKind::Value(ConstValue::Scalar(element_count)) = cst.val();
46+
if let ConstKind::Value(ConstValue::Scalar(element_count)) = cst.kind();
4747
if let Ok(element_count) = element_count.to_machine_usize(&cx.tcx);
4848
if let Ok(element_size) = cx.layout_of(*element_type).map(|l| l.size.bytes());
4949
if self.maximum_allowed_size < element_count * element_size;

clippy_utils/src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ impl<'a, 'tcx> ConstEvalLateContext<'a, 'tcx> {
582582

583583
pub fn miri_to_const(result: ty::Const<'_>) -> Option<Constant> {
584584
use rustc_middle::mir::interpret::ConstValue;
585-
match result.val() {
585+
match result.kind() {
586586
ty::ConstKind::Value(ConstValue::Scalar(Scalar::Int(int))) => {
587587
match result.ty().kind() {
588588
ty::Bool => Some(Constant::Bool(int == ScalarInt::TRUE)),

0 commit comments

Comments
 (0)