Skip to content

Commit 6f14223

Browse files
committed
---
yaml --- r: 236055 b: refs/heads/stable c: 108a697 h: refs/heads/master i: 236053: 6f4822e 236051: 242e6ab 236047: 5f01c7d v: v3
1 parent fe60aa2 commit 6f14223

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: b26958caf745a05b4fa45b655ffeab18445cdb9b
32+
refs/heads/stable: 108a697b1c225dafef16a77076e30149b1d0ebe7
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/conversions.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Coercion is allowed between the following types:
5353
* `&mut T` to `*mut T`
5454
* Unsizing: `T` to `U` if `T` implements `CoerceUnsized<U>`
5555

56-
`CoerceUnsized<Pointer<U>> for Pointer<T>` where T: Unsize<U> is implemented
56+
`CoerceUnsized<Pointer<U>> for Pointer<T> where T: Unsize<U>` is implemented
5757
for all pointer types (including smart pointers like Box and Rc). Unsize is
5858
only implemented automatically, and enables the following transformations:
5959

@@ -65,7 +65,6 @@ only implemented automatically, and enables the following transformations:
6565
* `Foo` is a struct
6666
* Only the last field has type `T`
6767
* `T` is not part of the type of any other fields
68-
(note that this also applies to to tuples as an anonymous struct `Tuple3<T, U, V>`)
6968

7069
Coercions occur at a *coercion site*. Any location that is explicitly typed
7170
will cause a coercion to its type. If inference is necessary, the coercion will
@@ -106,13 +105,19 @@ fn main() {
106105
^~~
107106
```
108107

108+
109+
110+
109111
# The Dot Operator
110112

111113
The dot operator will perform a lot of magic to convert types. It will perform
112114
auto-referencing, auto-dereferencing, and coercion until types match.
113115

114116
TODO: steal information from http://stackoverflow.com/questions/28519997/what-are-rusts-exact-auto-dereferencing-rules/28552082#28552082
115117

118+
119+
120+
116121
# Casts
117122

118123
Casts are a superset of coercions: every coercion can be explicitly invoked via a
@@ -171,6 +176,8 @@ For numeric casts, there are quite a few cases to consider:
171176

172177

173178

179+
180+
174181
# Conversion Traits
175182

176183
TODO?

0 commit comments

Comments
 (0)