File tree 2 files changed +5
-5
lines changed
src/librustc_middle/mir/interpret
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -362,7 +362,7 @@ pub enum UndefinedBehaviorInfo {
362
362
/// Working with a local that is not currently live.
363
363
DeadLocal ,
364
364
/// Data size is not equal to target size
365
- ArgumentSizeMismatch {
365
+ ScalarSizeMismatch {
366
366
target_size : u64 ,
367
367
data_size : u64 ,
368
368
} ,
@@ -427,9 +427,9 @@ impl fmt::Debug for UndefinedBehaviorInfo {
427
427
"using uninitialized data, but this operation requires initialized memory"
428
428
) ,
429
429
DeadLocal => write ! ( f, "accessing a dead local variable" ) ,
430
- ArgumentSizeMismatch { target_size, data_size } => write ! (
430
+ ScalarSizeMismatch { target_size, data_size } => write ! (
431
431
f,
432
- "argument size mismatch: expected {} bytes but got {} bytes instead" ,
432
+ "scalar size mismatch: expected {} bytes but got {} bytes instead" ,
433
433
target_size, data_size
434
434
) ,
435
435
}
Original file line number Diff line number Diff line change @@ -394,9 +394,9 @@ impl<'tcx, Tag> Scalar<Tag> {
394
394
match self {
395
395
Scalar :: Raw { data, size } => {
396
396
if target_size. bytes ( ) != u64:: from ( size) {
397
- throw_ub ! ( ArgumentSizeMismatch {
397
+ throw_ub ! ( ScalarSizeMismatch {
398
398
target_size: target_size. bytes( ) ,
399
- data_size: u64 :: from( size)
399
+ data_size: u64 :: from( size) ,
400
400
} ) ;
401
401
}
402
402
Scalar :: check_data ( data, size) ;
You can’t perform that action at this time.
0 commit comments