`[const] Destruct` bounds aren't rendered
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Tracking issue: #133214
[const] Destruct bounds are rendered as an empty bounds list, which is exposed by some const std functions.
This is not the case for other [const] trait bounds:
#![feature(const_trait_impl)]
pub const trait Foo {}
pub const fn f<T>(_: &T)
where T: [const] Foo {}
While this is a deliberate choice https://github.com/rust-lang/rust/blob/d29e4783dff30f9526eeba3929ebfe86c00c9dad/src/librustdoc/clean/mod.rs#L229-L234
I think this results in a confusing render, and that it would be better to display it or omit the where T: entirely here
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/librustdoc/clean/mod.rs at the linked lines 229-234, then reproduce the rustdoc output with the provided const-trait examples. Compare the [const] Destruct rendering with the other [const] bound, and consider the issue's two expected outcomes: display the bound or omit the empty where T: clause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100