Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure that cast in parser is not going to cause issues #218

Open
github-actions bot opened this issue Jun 16, 2024 · 0 comments
Open

Make sure that cast in parser is not going to cause issues #218

github-actions bot opened this issue Jun 16, 2024 · 0 comments

Comments

@github-actions
Copy link

Check this cast down to u16

Line: 176

#[allow(clippy::cast_possible_truncation)]
pub fn parse_value(i: &str) -> AsmResult<ImmediateType> {
alt((
// TODO: Make sure that cast in parser is not going to cause issues
// category=Toolchain
// Check this cast down to u16
map(parse_number, |n| ImmediateType::Value(n as u16)).context("number"),
map(parse_symbol_reference, |ref_token| {
ImmediateType::SymbolRef(ref_token)
})
.context("symbol reference"),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants