Skip to content
Permalink
Browse files

Improve special-traits section very slightly.

  • Loading branch information
graydon committed Apr 18, 2015
1 parent 7f2f09f commit f5b296310320a49897e05112f8fb739d55cdf695
Showing with 10 additions and 8 deletions.
  1. +10 −8 src/doc/reference.md
@@ -3821,18 +3821,20 @@ impl Printable for String {
`self` refers to the value of type `String` that is the receiver for a call to
the method `make_string`.

# The `Copy` trait
# Special traits

Rust has a special trait, `Copy`, which when implemented changes the semantics
of a value. Values whose type implements `Copy` are copied rather than moved
upon assignment.
Several traits define special evaluation behavior.

# The `Sized` trait
## The `Copy` trait

`Sized` is a special trait which indicates that the size of this type is known
at compile-time.
The `Copy` trait changes the semantics of a type implementing it. Values whose
type implements `Copy` are copied rather than moved upon assignment.

# The `Drop` trait
## The `Sized` trait

The `Sized` trait indicates that the size of this type is known at compile-time.

## The `Drop` trait

The `Drop` trait provides a destructor, to be run whenever a value of this type
is to be destroyed.

0 comments on commit f5b2963

Please sign in to comment.
You can’t perform that action at this time.