MCPcopy Index your code
hub / github.com/RustPython/RustPython / has_const

Method has_const

crates/stdlib/src/_opcode.rs:71–76  ·  view source on GitHub ↗
(opcode: i32)

Source from the content-addressed store, hash-verified

69 /// Check if instruction uses co_consts
70 #[must_use]
71 pub fn has_const(opcode: i32) -> bool {
72 matches!(
73 Self::try_from(opcode).map(|op| op.inner()),
74 Ok(AnyInstruction::Real(Instruction::LoadConst { .. }))
75 )
76 }
77
78 /// Check if instruction uses co_names
79 #[must_use]

Callers 1

opcode.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected