about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-10-27 08:27:53 +0000
committerbors <bors@rust-lang.org>2015-10-27 08:27:53 +0000
commit0152a93bb41ba360b41dd62451c2472fc5978d0c (patch)
tree17e5e7c91eeb43294937f7391b643f50ce176488
parent996ba1d3062a3c1a80878bd25fbde84b2884cad7 (diff)
parent32e4ba8f50de279d2c3f0aaaf291e650e067fff7 (diff)
downloadrust-0152a93bb41ba360b41dd62451c2472fc5978d0c.tar.gz
rust-0152a93bb41ba360b41dd62451c2472fc5978d0c.zip
Auto merge of #29317 - matklad:clarify-reference, r=steveklabnik
Rust reference is a bit confusing here, because it does not explicitly mention trait objects.

See an example of confusion here https://users.rust-lang.org/t/confusion-about-impls-without-for/3379/2 :)

r? @steveklabnik
-rw-r--r--src/doc/reference.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md
index a9e12833906..037fb6a8d98 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -1520,11 +1520,11 @@ impl Shape for Circle {
 ```
 
 It is possible to define an implementation without referring to a trait. The
-methods in such an implementation can only be used as direct calls on the
-values of the type that the implementation targets. In such an implementation,
-the trait type and `for` after `impl` are omitted. Such implementations are
-limited to nominal types (enums, structs), and the implementation must appear
-in the same crate as the `self` type:
+methods in such an implementation can only be used as direct calls on the values
+of the type that the implementation targets. In such an implementation, the
+trait type and `for` after `impl` are omitted. Such implementations are limited
+to nominal types (enums, structs, trait objects), and the implementation must
+appear in the same crate as the `self` type:
 
 ```
 struct Point {x: i32, y: i32}