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

[WIP] Functionality for int_format_into for integer types #138338

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

madhav-madhusoodanan
Copy link
Contributor

@madhav-madhusoodanan madhav-madhusoodanan commented Mar 11, 2025

Context

  1. Implementedl integer formatting into a fixed-size buffer without relying on fmt.
  2. Added a NumBuffer type to help with this process.

Associated Issue

r? @hanna-kruppe

@rustbot
Copy link
Collaborator

rustbot commented Mar 11, 2025

Failed to set assignee to hanna-kruppe: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 11, 2025
@madhav-madhusoodanan
Copy link
Contributor Author

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 11, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@hanna-kruppe
Copy link
Contributor

FYI, I'm going to unsubscribe from notifications here for now. As the bot said, I'm not a reviewer on this repository and you should pick someone else once the PR is ready for review. Although I can't approve any PR, I wouldn't mind also giving some input on this one, so feel free to @ me again at that point. But right now I'm getting a firehose of uninformative emails that makes it likely I'll miss the point where it would be useful for me to take a look.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- library/core/src/num/int_format.rs - num::int_format::i128::format_into (line 261) stdout ----
error[E0599]: no associated item named `MINi128` found for type `i128` in the current scope
  --> library/core/src/num/int_format.rs:269:18
   |
11 | let n2 = i128 :: MINi128;
   |                  ^^^^^^^ associated item not found in `i128`

error[E0599]: no associated item named `MAXi128` found for type `i128` in the current scope
  --> library/core/src/num/int_format.rs:273:18
   |
15 | let n3 = i128 :: MAXi128;
   |                  ^^^^^^^ associated item not found in `i128`

---
---- library/core/src/num/int_format.rs - num::int_format::i16::format_into (line 261) stdout ----
error[E0599]: no associated item named `MINi16` found for type `i16` in the current scope
  --> library/core/src/num/int_format.rs:269:17
   |
11 | let n2 = i16 :: MINi16;
   |                 ^^^^^^ associated item not found in `i16`
   |
help: there is an associated constant `MIN` with a similar name
   |
11 - let n2 = i16 :: MINi16;
11 + let n2 = i16 :: MIN;
   |

error[E0599]: no associated item named `MAXi16` found for type `i16` in the current scope
  --> library/core/src/num/int_format.rs:273:17
   |
15 | let n3 = i16 :: MAXi16;
   |                 ^^^^^^ associated item not found in `i16`
   |
help: there is an associated constant `MAX` with a similar name
   |
15 - let n3 = i16 :: MAXi16;
15 + let n3 = i16 :: MAX;
   |

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.
Couldn't compile the test.
---- library/core/src/num/int_format.rs - num::int_format::i32::format_into (line 261) stdout ----
error[E0599]: no associated item named `MINi32` found for type `i32` in the current scope
  --> library/core/src/num/int_format.rs:269:17
   |
11 | let n2 = i32 :: MINi32;
   |                 ^^^^^^ associated item not found in `i32`
   |
help: there is an associated constant `MIN` with a similar name
   |
11 - let n2 = i32 :: MINi32;
11 + let n2 = i32 :: MIN;
   |

error[E0599]: no associated item named `MAXi32` found for type `i32` in the current scope
  --> library/core/src/num/int_format.rs:273:17
   |
15 | let n3 = i32 :: MAXi32;
   |                 ^^^^^^ associated item not found in `i32`
   |
help: there is an associated constant `MAX` with a similar name
   |
15 - let n3 = i32 :: MAXi32;
15 + let n3 = i32 :: MAX;
   |

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.
Couldn't compile the test.
---- library/core/src/num/int_format.rs - num::int_format::i64::format_into (line 261) stdout ----
error[E0599]: no associated item named `MINi64` found for type `i64` in the current scope
  --> library/core/src/num/int_format.rs:269:17
   |
11 | let n2 = i64 :: MINi64;
   |                 ^^^^^^ associated item not found in `i64`
   |
help: there is an associated constant `MIN` with a similar name
   |
11 - let n2 = i64 :: MINi64;
11 + let n2 = i64 :: MIN;
   |

error[E0599]: no associated item named `MAXi64` found for type `i64` in the current scope
  --> library/core/src/num/int_format.rs:273:17
   |
15 | let n3 = i64 :: MAXi64;
   |                 ^^^^^^ associated item not found in `i64`
   |
help: there is an associated constant `MAX` with a similar name
   |
15 - let n3 = i64 :: MAXi64;
15 + let n3 = i64 :: MAX;
   |

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.
Couldn't compile the test.
---- library/core/src/num/int_format.rs - num::int_format::i8::format_into (line 261) stdout ----
error[E0599]: no associated item named `MINi8` found for type `i8` in the current scope
  --> library/core/src/num/int_format.rs:269:16
   |
11 | let n2 = i8 :: MINi8;
   |                ^^^^^ associated item not found in `i8`
   |
help: there is an associated constant `MIN` with a similar name
   |
11 - let n2 = i8 :: MINi8;
11 + let n2 = i8 :: MIN;
   |

error[E0599]: no associated item named `MAXi8` found for type `i8` in the current scope
  --> library/core/src/num/int_format.rs:273:16
   |
15 | let n3 = i8 :: MAXi8;
   |                ^^^^^ associated item not found in `i8`
   |
help: there is an associated constant `MAX` with a similar name
   |
15 - let n3 = i8 :: MAXi8;
15 + let n3 = i8 :: MAX;
   |

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.
Couldn't compile the test.
---- library/core/src/num/int_format.rs - num::int_format::isize::format_into (line 261) stdout ----
error[E0599]: no associated item named `MINisize` found for type `isize` in the current scope
  --> library/core/src/num/int_format.rs:269:19
   |
11 | let n2 = isize :: MINisize;
   |                   ^^^^^^^^ associated item not found in `isize`

error[E0599]: no associated item named `MAXisize` found for type `isize` in the current scope
  --> library/core/src/num/int_format.rs:273:19
   |
15 | let n3 = isize :: MAXisize;
   |                   ^^^^^^^^ associated item not found in `isize`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.
Couldn't compile the test.
---- library/core/src/num/int_format.rs - num::int_format::u128::format_into (line 260) stdout ----
error[E0599]: no associated item named `MAXu128` found for type `u128` in the current scope
  --> library/core/src/num/int_format.rs:268:18
   |
11 | let n2 = u128 :: MAXu128;
   |                  ^^^^^^^ associated item not found in `u128`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.
Couldn't compile the test.
---- library/core/src/num/int_format.rs - num::int_format::u16::format_into (line 260) stdout ----
error[E0599]: no associated item named `MAXu16` found for type `u16` in the current scope
  --> library/core/src/num/int_format.rs:268:17
   |
11 | let n2 = u16 :: MAXu16;
   |                 ^^^^^^ associated item not found in `u16`
   |
help: there is an associated constant `MAX` with a similar name
   |
11 - let n2 = u16 :: MAXu16;
11 + let n2 = u16 :: MAX;
   |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.
Couldn't compile the test.
---- library/core/src/num/int_format.rs - num::int_format::u32::format_into (line 260) stdout ----
error[E0599]: no associated item named `MAXu32` found for type `u32` in the current scope
  --> library/core/src/num/int_format.rs:268:17
   |
11 | let n2 = u32 :: MAXu32;
   |                 ^^^^^^ associated item not found in `u32`
   |
help: there is an associated constant `MAX` with a similar name
   |
11 - let n2 = u32 :: MAXu32;
11 + let n2 = u32 :: MAX;
   |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.
Couldn't compile the test.
---- library/core/src/num/int_format.rs - num::int_format::u64::format_into (line 260) stdout ----
error[E0599]: no associated item named `MAXu64` found for type `u64` in the current scope
  --> library/core/src/num/int_format.rs:268:17
   |
11 | let n2 = u64 :: MAXu64;
   |                 ^^^^^^ associated item not found in `u64`
   |
help: there is an associated constant `MAX` with a similar name
   |
11 - let n2 = u64 :: MAXu64;
11 + let n2 = u64 :: MAX;
   |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.
Couldn't compile the test.
---- library/core/src/num/int_format.rs - num::int_format::u8::format_into (line 260) stdout ----
error[E0599]: no associated item named `MAXu8` found for type `u8` in the current scope
  --> library/core/src/num/int_format.rs:268:16
   |
11 | let n2 = u8 :: MAXu8;
   |                ^^^^^ associated item not found in `u8`
   |
help: there is an associated constant `MAX` with a similar name
   |
11 - let n2 = u8 :: MAXu8;
11 + let n2 = u8 :: MAX;
   |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.
Couldn't compile the test.
---- library/core/src/num/int_format.rs - num::int_format::usize::format_into (line 260) stdout ----
error[E0599]: no associated item named `MAXusize` found for type `usize` in the current scope
  --> library/core/src/num/int_format.rs:268:19
   |
11 | let n2 = usize :: MAXusize;
   |                   ^^^^^^^^ associated item not found in `usize`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants