Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve docs
  • Loading branch information
ShaharNaveh committed Feb 6, 2026
commit 1035006618ab019d89abb208f9b8c8445e06974f
11 changes: 8 additions & 3 deletions crates/compiler-core/src/bytecode/oparg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ impl OpArgState {
/// - impl [`Into<u32>`]
/// - impl [`OpArgType`]
///
/// # Note
/// If an enum variant has "alternative" values (i.e. `Foo = 0 | 1`), the first value will be the
/// result of converting to a number.
///
/// # Examples
///
/// ```rust
Expand All @@ -122,9 +126,10 @@ impl OpArgState {
/// #[derive(Clone, Copy)]
/// pub enum MyOpArg {
/// /// Some doc.
/// Foo = 0,
/// Bar = 2,
/// Baz = 5,
/// Foo = 4,
/// Bar = 8,
/// Baz = 15 | 16,
/// Qux = 23 | 42
/// }
/// );
/// ```
Expand Down
Loading