diff options
| author | bors <bors@rust-lang.org> | 2015-01-12 04:45:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-12 04:45:18 +0000 |
| commit | 0aec4db1c09574da2f30e3844de6d252d79d4939 (patch) | |
| tree | 64ef8983eb848612559f373ab7069e033672745f /src/doc/reference.md | |
| parent | 15a41380c14e94052332360b104ec1651f97297b (diff) | |
| parent | 02d0a8bbcf0a64339e4279c4ddb4841189ba5069 (diff) | |
| download | rust-0aec4db1c09574da2f30e3844de6d252d79d4939.tar.gz rust-0aec4db1c09574da2f30e3844de6d252d79d4939.zip | |
auto merge of #20889 : Manishearth/rust/trait-error, r=nikomatsakis
fixes #20783 r? @nikomatsakis
Diffstat (limited to 'src/doc/reference.md')
| -rw-r--r-- | src/doc/reference.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index 6c34d4546cd..623097b2fc9 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -2117,6 +2117,13 @@ macro scope. destructors from being run twice. Destructors might be run multiple times on the same object with this attribute. - `doc` - Doc comments such as `/// foo` are equivalent to `#[doc = "foo"]`. +- `rustc_on_unimplemented` - Write a custom note to be shown along with the error + when the trait is found to be unimplemented on a type. + You may use format arguments like `{T}`, `{A}` to correspond to the + types at the point of use corresponding to the type parameters of the + trait of the same name. `{Self}` will be replaced with the type that is supposed + to implement the trait but doesn't. To use this, the `on_unimplemented` feature gate + must be enabled. ### Conditional compilation |
