[unsafe-fields] Support tuple structs
Open
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 179
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 29
Description
While generating field names in macros would be tricky (since we'd need to synthesize `0`, `1`, etc), we don't actually need to use field names - we just need to use unique strings. We can do this by having the string input to the hash function be all types up through and including the given field. E.g., for the type:
```rust
struct Foo(Bar, Baz, Blah);
```
We would desugar into:
```rust
struct Foo(
Unsafe,
Unsafe,
Unsafe,
);
```
Contributor guide
Assessment
This issue has not been assessed yet.