Skip to content

Commit e89dcb8

Browse files
committed
auto merge of #7549 : sfackler/rust/docs, r=msullivan
I'm leaving the Sized kind undocumented since it isn't fully implemented yet.
2 parents b055a10 + c63b3f8 commit e89dcb8

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

doc/rust.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2869,24 +2869,19 @@ The kinds are:
28692869
: Types of this kind can be safely sent between tasks.
28702870
This kind includes scalars, owning pointers, owned closures, and
28712871
structural types containing only other owned types. All `Send` types are `Static`.
2872-
`Static`
2873-
: Types of this kind do not contain any borrowed pointers;
2874-
this can be a useful guarantee for code that breaks borrowing assumptions using [`unsafe` operations](#unsafe-functions).
28752872
`Copy`
28762873
: This kind includes all types that can be copied. All types with
28772874
sendable kind are copyable, as are managed boxes, managed closures,
28782875
trait types, and structural types built out of these.
28792876
Types with destructors (types that implement `Drop`) can not implement `Copy`.
28802877
`Drop`
28812878
: This is not strictly a kind, but its presence interacts with kinds: the `Drop`
2882-
trait provides a single method `finalize` that takes no parameters, and is run
2879+
trait provides a single method `drop` that takes no parameters, and is run
28832880
when values of the type are dropped. Such a method is called a "destructor",
28842881
and are always executed in "top-down" order: a value is completely destroyed
28852882
before any of the values it owns run their destructors. Only `Send` types
28862883
that do not implement `Copy` can implement `Drop`.
28872884

2888-
> **Note:** The `finalize` method may be renamed in future versions of Rust.
2889-
28902885
_Default_
28912886
: Types with destructors, closure environments,
28922887
and various other _non-first-class_ types,

src/libstd/bool.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ pub fn xor(a: bool, b: bool) -> bool { (a && !b) || (!a && b) }
122122
* ~~~ {.rust}
123123
* rusti> std::bool::implies(true, true)
124124
* true
125+
* ~~~
125126
*
126127
* ~~~ {.rust}
127128
* rusti> std::bool::implies(true, false)

src/libstd/kinds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ intrinsic properties of the type. These classifications, often called
1818
They cannot be implemented by user code, but are instead implemented
1919
by the compiler automatically for the types to which they apply.
2020
21-
The 4 kinds are
21+
The 3 kinds are
2222
2323
* Copy - types that may be copied without allocation. This includes
2424
scalar types and managed pointers, and exludes owned pointers. It

0 commit comments

Comments
 (0)