diff options
| author | Philippe Nadon <phil@nadon.io> | 2020-08-08 07:53:47 -0600 |
|---|---|---|
| committer | Philippe Nadon <phil@nadon.io> | 2020-08-08 07:53:47 -0600 |
| commit | 2d1515a2c532b0cceec4a14da6f21e48fdca2da5 (patch) | |
| tree | c777fe9e8d16e010de4482447192ff1d26ec2ab3 | |
| parent | 01bba2c532c1f8bfc1463d672c6b2fc79bd96495 (diff) | |
| download | rust-2d1515a2c532b0cceec4a14da6f21e48fdca2da5.tar.gz rust-2d1515a2c532b0cceec4a14da6f21e48fdca2da5.zip | |
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
| -rw-r--r-- | clippy_lints/src/consts.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/consts.rs b/clippy_lints/src/consts.rs index 49ff86a205d..c77b80bc237 100644 --- a/clippy_lints/src/consts.rs +++ b/clippy_lints/src/consts.rs @@ -517,7 +517,7 @@ pub fn miri_to_const(result: &ty::Const<'_>) -> Option<Constant> { ty::ConstKind::Value(ConstValue::Slice { data, start, end }) => match result.ty.kind { ty::Ref(_, tam, _) => match tam.kind { ty::Str => String::from_utf8( - data.inspect_with_undef_and_ptr_outside_interpreter(start..end) + data.inspect_with_uninit_and_ptr_outside_interpreter(start..end) .to_owned(), ) .ok() @@ -530,7 +530,7 @@ pub fn miri_to_const(result: &ty::Const<'_>) -> Option<Constant> { ty::Array(sub_type, len) => match sub_type.kind { ty::Float(FloatTy::F32) => match miri_to_const(len) { Some(Constant::Int(len)) => alloc - .inspect_with_undef_and_ptr_outside_interpreter(0..(4 * len as usize)) + .inspect_with_uninit_and_ptr_outside_interpreter(0..(4 * len as usize)) .to_owned() .chunks(4) .map(|chunk| { @@ -544,7 +544,7 @@ pub fn miri_to_const(result: &ty::Const<'_>) -> Option<Constant> { }, ty::Float(FloatTy::F64) => match miri_to_const(len) { Some(Constant::Int(len)) => alloc - .inspect_with_undef_and_ptr_outside_interpreter(0..(8 * len as usize)) + .inspect_with_uninit_and_ptr_outside_interpreter(0..(8 * len as usize)) .to_owned() .chunks(8) .map(|chunk| { |
