Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug output doesn't honor formatting specifier x #268

Open
chkno opened this issue Feb 10, 2023 · 1 comment
Open

Debug output doesn't honor formatting specifier x #268

chkno opened this issue Feb 10, 2023 · 1 comment

Comments

@chkno
Copy link

chkno commented Feb 10, 2023

use num_bigint::BigUint;
 
fn main() {
    let small = 32768usize;
    let big = BigUint::from(small);
    println!("{small:x} {big:x}");
    println!("{small:x?} {big:x?}");
}

Prints:

8000 8000
8000 32768

It should print:

8000 8000
8000 8000
@cuviper
Copy link
Member

cuviper commented Feb 11, 2023

There's no public way for us to get that flag from the Formatter:
rust-lang/rust#48584

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants