File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/librustc_middle/mir/interpret Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -362,7 +362,7 @@ pub enum UndefinedBehaviorInfo {
362362 /// Working with a local that is not currently live.
363363 DeadLocal ,
364364 /// Data size is not equal to target size
365- ArgumentSizeMismatch {
365+ ScalarSizeMismatch {
366366 target_size : u64 ,
367367 data_size : u64 ,
368368 } ,
@@ -427,9 +427,9 @@ impl fmt::Debug for UndefinedBehaviorInfo {
427427 "using uninitialized data, but this operation requires initialized memory"
428428 ) ,
429429 DeadLocal => write ! ( f, "accessing a dead local variable" ) ,
430- ArgumentSizeMismatch { target_size, data_size } => write ! (
430+ ScalarSizeMismatch { target_size, data_size } => write ! (
431431 f,
432- "argument size mismatch: expected {} bytes but got {} bytes instead" ,
432+ "scalar size mismatch: expected {} bytes but got {} bytes instead" ,
433433 target_size, data_size
434434 ) ,
435435 }
Original file line number Diff line number Diff line change @@ -394,9 +394,9 @@ impl<'tcx, Tag> Scalar<Tag> {
394394 match self {
395395 Scalar :: Raw { data, size } => {
396396 if target_size. bytes ( ) != u64:: from ( size) {
397- throw_ub ! ( ArgumentSizeMismatch {
397+ throw_ub ! ( ScalarSizeMismatch {
398398 target_size: target_size. bytes( ) ,
399- data_size: u64 :: from( size)
399+ data_size: u64 :: from( size) ,
400400 } ) ;
401401 }
402402 Scalar :: check_data ( data, size) ;
You can’t perform that action at this time.
0 commit comments