rust-lang / rust-lang/fls

Unsize rules issues

Open
#457 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-coercions A-types C-bug
Dominant language
reStructuredText
Stars
497
Forks
41
Avg merge
3h 52m
Merged PRs (30d)
4

Description

https://github.com/ferrocene/specification/blob/496ef38bcfe074d88580021b5b3fadc0239c85b2/src/types-and-traits.rst?plain=1#L2011-L2012

This rule is not required. This code compiles even though i32: Unsize<u32> is not true.

https://github.com/ferrocene/specification/blob/496ef38bcfe074d88580021b5b3fadc0239c85b2/src/types-and-traits.rst?plain=1#L2017-L2020

This rule should be generalized to allow multiple parameters to be changed. See the example committed in rust-lang/rust#117495 (tests/ui/unsized/unsize-coerce-multiple-adt-params.rs).

Also, this X field isn't referenced later in the document.

Contributor guide

Open the contributing guide

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.

Research direction

Read src/types-and-traits.rst around lines 2002 and 2011-2020, then compare the referenced Rust playground and rust-lang/rust test unsize-coerce-multiple-adt-params.rs. Update the specification so the listed Unsize rules match these examples and remove the unreferenced X field. Done means all three noted inconsistencies are resolved in the specification.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.