Implement `Default`

Open
#4,975 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
rust

Research direction

Start by reading the s! and s_no_extra_traits! macro definitions and the linked Zulip discussion. Investigate how Default could cover the generated bindings, especially [T; N] for N > 32 and unions. Done means the intended broad set of types has working Default implementations without relying directly on an unsuitable derive.

Written by the indexing model from the issue text.

Description

E-help-wanted E-medium

Discussed at #t-libs > Questions and polls about `libc` 1.0 @ 💬, we would like to have a Default impl for pretty much everything. This should be part of s!/s_no_extra_traits! but won't work out of the box with a derive.

In particular, we need a workaround for [T; N] where N > 32, and unions somehow.

Dominant language
Rust
Stars
2.6k
Forks
1.3k
Avg merge
2d 13h
Merged PRs (30d)
27

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-lang/libc

All issues in rust-lang/libc

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.