Skip to content

Commit 91aa55d

Browse files
authored
Rollup merge of #75226 - pnadon:miri-undef-uninit, r=RalfJung
Miri: Renamed "undef" to "uninit" Renamed remaining references to "undef" to "uninit" when referring to Miri. Impacted directories are: - `src/librustc_codegen_llvm/consts.rs` - `src/librustc_middle/mir/interpret/` - `src/librustc_middle/ty/print/pretty.rs` - `src/librustc_mir/` - `src/tools/clippy/clippy_lints/src/consts.rs` Upon building Miri based on the new changes it was verified that no changes needed to be made with the Miri project. Related issue #71193
2 parents 9e73d33 + 2d1515a commit 91aa55d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clippy_lints/src/consts.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ pub fn miri_to_const(result: &ty::Const<'_>) -> Option<Constant> {
517517
ty::ConstKind::Value(ConstValue::Slice { data, start, end }) => match result.ty.kind {
518518
ty::Ref(_, tam, _) => match tam.kind {
519519
ty::Str => String::from_utf8(
520-
data.inspect_with_undef_and_ptr_outside_interpreter(start..end)
520+
data.inspect_with_uninit_and_ptr_outside_interpreter(start..end)
521521
.to_owned(),
522522
)
523523
.ok()
@@ -530,7 +530,7 @@ pub fn miri_to_const(result: &ty::Const<'_>) -> Option<Constant> {
530530
ty::Array(sub_type, len) => match sub_type.kind {
531531
ty::Float(FloatTy::F32) => match miri_to_const(len) {
532532
Some(Constant::Int(len)) => alloc
533-
.inspect_with_undef_and_ptr_outside_interpreter(0..(4 * len as usize))
533+
.inspect_with_uninit_and_ptr_outside_interpreter(0..(4 * len as usize))
534534
.to_owned()
535535
.chunks(4)
536536
.map(|chunk| {
@@ -544,7 +544,7 @@ pub fn miri_to_const(result: &ty::Const<'_>) -> Option<Constant> {
544544
},
545545
ty::Float(FloatTy::F64) => match miri_to_const(len) {
546546
Some(Constant::Int(len)) => alloc
547-
.inspect_with_undef_and_ptr_outside_interpreter(0..(8 * len as usize))
547+
.inspect_with_uninit_and_ptr_outside_interpreter(0..(8 * len as usize))
548548
.to_owned()
549549
.chunks(8)
550550
.map(|chunk| {

0 commit comments

Comments
 (0)