Skip to content

Commit

Permalink
Dyn traits must also be used
Browse files Browse the repository at this point in the history
  • Loading branch information
botahamec authored and CAD97 committed Aug 2, 2022
1 parent 0e3bf27 commit b52460f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/attributes/diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ five();
```

When used on a [trait declaration], a [call expression] of an [expression
statement] to a function that returns an [impl trait] of that trait violates
statement] to a function that returns an [impl trait] or a [dyn trait] of that trait violates
the `unused_must_use` lint.

```rust
Expand Down Expand Up @@ -309,6 +309,7 @@ When used on a function in a trait implementation, the attribute does nothing.
[attributes]: ../attributes.md
[block expression]: ../expressions/block-expr.md
[call expression]: ../expressions/call-expr.md
[dyn trait]: ../types/trait-object.md
[enum variant]: ../items/enumerations.md
[enum]: ../items/enumerations.md
[expression statement]: ../statements.md#expression-statements
Expand Down

0 comments on commit b52460f

Please sign in to comment.