Skip to content

Commit f3c0dc3

Browse files
committed
Fix doc example
1 parent bc1d6bb commit f3c0dc3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

crates/compiler-core/src/bytecode.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,12 +1091,13 @@ op_arg_enum!(
10911091

10921092
op_arg_enum!(
10931093
/// The possible Binary operators
1094+
///
10941095
/// # Examples
10951096
///
10961097
/// ```rust
1097-
/// use rustpython_compiler_core::Instruction::BinaryOp;
1098-
/// use rustpython_compiler_core::BinaryOperator::BinaryOperator;
1099-
/// let op = BinaryOp {op: BinaryOperator::Add};
1098+
/// use rustpython_compiler_core::bytecode::{Arg, BinaryOperator, Instruction};
1099+
/// let (op, _) = Arg::new(BinaryOperator::Add);
1100+
/// let instruction = Instruction::BinaryOp { op };
11001101
/// ```
11011102
///
11021103
/// See also:

0 commit comments

Comments
 (0)