Skip to content

Commit 854d7bc

Browse files
author
Ben Leadbetter
committed
bugfix: fixes not operator creates invalid types
* fixes Not implementations creating types with out-of-bounds representations
1 parent 54c7e61 commit 854d7bc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -970,4 +970,9 @@ mod tests {
970970
assert_eq!(!u7(0), u7(0x7F));
971971
assert_eq!(!u7(56), u7(71));
972972
}
973+
974+
#[test]
975+
fn test_not_creates_valid_repr() {
976+
assert_eq!((!u4(0b0101)).0, 0b1010);
977+
}
973978
}

0 commit comments

Comments
 (0)