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

Make Default const and add some const Default impls #134628

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

estebank
Copy link
Contributor

Full list of impl const Default types:

  • ()
  • bool
  • char
  • std::ascii::Char
  • usize
  • u8
  • u16
  • u32
  • u64
  • u128
  • i8
  • i16
  • i32
  • i64
  • i128
  • f16
  • f32
  • f64
  • f128
  • std::marker::PhantomData
  • Option
  • std::iter::Empty
  • std::ptr::Alignment
  • &[T]
  • &mut [T]
  • &str
  • &mut str
  • String
  • Vec

@rustbot
Copy link
Collaborator

rustbot commented Dec 21, 2024

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 21, 2024
@estebank
Copy link
Contributor Author

Made this for some experiments with default field values, might as well put it somewhere visible as it seems like an obvious next step for the const traits effort.

@compiler-errors
Copy link
Member

Please make sure this is assigned to someone on @rust-lang/project-const-traits if you take this out of draft.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Dec 24, 2024

☔ The latest upstream changes (presumably #134716) made this pull request unmergeable. Please resolve the merge conflicts.

Full list of `impl const Default` types:

- ()
- bool
- char
- std::ascii::Char
- usize
- u8
- u16
- u32
- u64
- u128
- i8
- i16
- i32
- i64
- i128
- f16
- f32
- f64
- f128
- std::marker::PhantomData<T>
- Option<T>
- std::iter::Empty<T>
- std::ptr::Alignment
- &[T]
- &mut [T]
- &str
- &mut str
- String
- Vec<T>
@estebank
Copy link
Contributor Author

r? @oli-obk

Let me know what would be needed to make this merge-ready.

@rustbot rustbot assigned oli-obk and unassigned wesleywiser Dec 25, 2024
@fee1-dead
Copy link
Member

I'd like to block this on #133999.

@fee1-dead fee1-dead added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: Blocked on something else such as an RFC or other implementation work. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

8 participants