Skip to content

Commit b28e430

Browse files
committed
---
yaml --- r: 222714 b: refs/heads/tmp c: 108a697 h: refs/heads/master v: v3
1 parent c8ef22d commit b28e430

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
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: 2b45108ecb944d63daba0f1b5529ac4c8afdc295
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: b26958caf745a05b4fa45b655ffeab18445cdb9b
28+
refs/heads/tmp: 108a697b1c225dafef16a77076e30149b1d0ebe7
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: e58601ab085591c71a27ae82137fc313222c2270
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/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)