Skip to content

Small documentation changes #7549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions doc/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -2869,24 +2869,19 @@ The kinds are:
: Types of this kind can be safely sent between tasks.
This kind includes scalars, owning pointers, owned closures, and
structural types containing only other owned types. All `Send` types are `Static`.
`Static`
: Types of this kind do not contain any borrowed pointers;
this can be a useful guarantee for code that breaks borrowing assumptions using [`unsafe` operations](#unsafe-functions).
`Copy`
: This kind includes all types that can be copied. All types with
sendable kind are copyable, as are managed boxes, managed closures,
trait types, and structural types built out of these.
Types with destructors (types that implement `Drop`) can not implement `Copy`.
`Drop`
: This is not strictly a kind, but its presence interacts with kinds: the `Drop`
trait provides a single method `finalize` that takes no parameters, and is run
trait provides a single method `drop` that takes no parameters, and is run
when values of the type are dropped. Such a method is called a "destructor",
and are always executed in "top-down" order: a value is completely destroyed
before any of the values it owns run their destructors. Only `Send` types
that do not implement `Copy` can implement `Drop`.

> **Note:** The `finalize` method may be renamed in future versions of Rust.

_Default_
: Types with destructors, closure environments,
and various other _non-first-class_ types,
Expand Down
1 change: 1 addition & 0 deletions src/libstd/bool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ pub fn xor(a: bool, b: bool) -> bool { (a && !b) || (!a && b) }
* ~~~ {.rust}
* rusti> std::bool::implies(true, true)
* true
* ~~~
*
* ~~~ {.rust}
* rusti> std::bool::implies(true, false)
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/kinds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ intrinsic properties of the type. These classifications, often called
They cannot be implemented by user code, but are instead implemented
by the compiler automatically for the types to which they apply.

The 4 kinds are
The 3 kinds are

* Copy - types that may be copied without allocation. This includes
scalar types and managed pointers, and exludes owned pointers. It
Expand Down