Add #![deny(clippy::cast_possible_truncation)]

This commit is contained in:
Jeong YunWon 2023-03-02 13:34:21 +09:00
parent 0cd04ca2de
commit 7b84229db5

View file

@ -18,8 +18,8 @@ use num_complex::Complex64;
use num_traits::ToPrimitive;
use rustpython_ast as ast;
use rustpython_compiler_core::{
self as bytecode, Arg as OpArgMarker, CodeObject, ConstantData, Instruction, Location, NameIdx,
OpArg, OpArgType,
self as bytecode, Arg as OpArgMarker, CodeObject, ConstantData, Instruction, Location, OpArg,
OpArgType,
};
use std::borrow::Cow;
@ -547,7 +547,7 @@ impl Compiler {
NameUsage::Delete => Instruction::DeleteLocal,
},
};
self.emit_arg(idx as NameIdx, op);
self.emit_arg(idx.to_u32(), op);
Ok(())
}