Skip to content

Commit b52460f

Browse files
botahamecCAD97
authored andcommitted
Dyn traits must also be used
1 parent 0e3bf27 commit b52460f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/attributes/diagnostics.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ five();
236236
```
237237

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

242242
```rust
@@ -309,6 +309,7 @@ When used on a function in a trait implementation, the attribute does nothing.
309309
[attributes]: ../attributes.md
310310
[block expression]: ../expressions/block-expr.md
311311
[call expression]: ../expressions/call-expr.md
312+
[dyn trait]: ../types/trait-object.md
312313
[enum variant]: ../items/enumerations.md
313314
[enum]: ../items/enumerations.md
314315
[expression statement]: ../statements.md#expression-statements

0 commit comments

Comments
 (0)