Skip to content

Add ide-assist: generate_documentation_from_trait#20408

Closed
A4-Tacks wants to merge 2 commits intorust-lang:masterfrom
A4-Tacks:gen-docs-from-trait
Closed

Add ide-assist: generate_documentation_from_trait#20408
A4-Tacks wants to merge 2 commits intorust-lang:masterfrom
A4-Tacks:gen-docs-from-trait

Conversation

@A4-Tacks
Copy link
Member

@A4-Tacks A4-Tacks commented Aug 8, 2025

Generate documents from items defined in the trait.

Implement #20407 (comment)

Example

trait Foo {
    /// some docs
    fn foo(&self);
}
impl Foo for () {
    fn $0foo(&self) {}
}

->

trait Foo {
    /// some docs
    fn foo(&self);
}
impl Foo for () {
    /// some docs
    fn foo(&self) {}
}

Example
===

```rust
trait Foo {
    /// some docs
    fn foo(&self);
}
impl Foo for () {
    fn $0foo(&self) {}
}
```
->
```rust
trait Foo {
    /// some docs
    fn foo(&self);
}
impl Foo for () {
    /// some docs
    fn foo(&self) {}
}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 8, 2025
@Veykril
Copy link
Member

Veykril commented Dec 21, 2025

This does not seem useful to me. Why would you need to duplicate the docs from the trait to the impl? And if you do you can go to def and copy

@Veykril Veykril closed this Dec 21, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants