Skip to content

Commit 34cc3c6

Browse files
authored
Merge pull request #76 from estebank/on-unimplemented-name
Update description of `rustc_on_unimplemented`
2 parents f223d09 + e65e732 commit 34cc3c6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/attributes.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,10 @@ macro scope.
206206
You may use format arguments like `{T}`, `{A}` to correspond to the
207207
types at the point of use corresponding to the type parameters of the
208208
trait of the same name. `{Self}` will be replaced with the type that is supposed
209-
to implement the trait but doesn't. To use this, the `on_unimplemented` feature gate
210-
must be enabled.
209+
to implement the trait but doesn't. You can also use the trait's name which will
210+
be replaced with the full path for the trait, for example for the trait `Foo` in
211+
module `Bar`, `{Foo}` can be used and will show up as `Bar::Foo`.
212+
To use this, the `on_unimplemented` feature gate must be enabled.
211213
- `must_use` - on structs and enums, will warn if a value of this type isn't used or
212214
assigned to a variable. You may also include an optional message by using
213215
`#[must_use = "message"]` which will be given alongside the warning.

0 commit comments

Comments
 (0)