Use u64 instead of i64 in Int type (#11356)

## Summary

I believe the value here is always unsigned, since we represent `-42` as
a unary operator on `42`.
This commit is contained in:
Charlie Marsh 2024-05-10 09:35:15 -04:00 committed by GitHub
parent 1f794077ec
commit 35ba3c91ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 35 additions and 39 deletions

View file

@ -1777,7 +1777,7 @@ def f(arg=%timeit a = b):
#[test]
fn test_numbers() {
let source =
"0x2f 0o12 0b1101 0 123 123_45_67_890 0.2 1e+2 2.1e3 2j 2.2j 000 0x995DC9BBDF1939FA";
"0x2f 0o12 0b1101 0 123 123_45_67_890 0.2 1e+2 2.1e3 2j 2.2j 000 0x995DC9BBDF1939FA 0x995DC9BBDF1939FA995DC9BBDF1939FA";
assert_debug_snapshot!(lex_source(source));
}

View file

@ -79,12 +79,18 @@ expression: lex_source(source)
),
(
Int {
value: 0x995DC9BBDF1939FA,
value: 11051210869376104954,
},
64..82,
),
(
Int {
value: 0x995DC9BBDF1939FA995DC9BBDF1939FA,
},
83..117,
),
(
Newline,
82..82,
117..117,
),
]