diff options
| author | Alexis Beingessner <a.beingessner@gmail.com> | 2015-07-20 16:18:52 -0700 |
|---|---|---|
| committer | Alexis Beingessner <a.beingessner@gmail.com> | 2015-07-20 16:18:52 -0700 |
| commit | 3f8e029bedba23b8b2d174fac2718f970a396676 (patch) | |
| tree | 2978d377e64f063d9a85ed7fffcfc07435ce53c4 | |
| parent | 5f02de3c226bce60c58ce2bc436e69c55b90a616 (diff) | |
| download | rust-3f8e029bedba23b8b2d174fac2718f970a396676.tar.gz rust-3f8e029bedba23b8b2d174fac2718f970a396676.zip | |
remove subtyping from coercions, it's something else
| -rw-r--r-- | src/doc/tarpl/coercions.md | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/doc/tarpl/coercions.md b/src/doc/tarpl/coercions.md index 0eb03d271c4..8bb82843ba0 100644 --- a/src/doc/tarpl/coercions.md +++ b/src/doc/tarpl/coercions.md @@ -1,16 +1,16 @@ % Coercions Types can implicitly be coerced to change in certain contexts. These changes are -generally just *weakening* of types, largely focused around pointers and lifetimes. -They mostly exist to make Rust "just work" in more cases, and are largely harmless. +generally just *weakening* of types, largely focused around pointers and +lifetimes. They mostly exist to make Rust "just work" in more cases, and are +largely harmless. Here's all the kinds of coercion: - Coercion is allowed between the following types: -* Subtyping: `T` to `U` if `T` is a [subtype][] of `U` -* Transitivity: `T_1` to `T_3` where `T_1` coerces to `T_2` and `T_2` coerces to `T_3` +* Transitivity: `T_1` to `T_3` where `T_1` coerces to `T_2` and `T_2` coerces to + `T_3` * Pointer Weakening: * `&mut T` to `&T` * `*mut T` to `*const T` @@ -68,5 +68,3 @@ fn main() { <anon>:10 foo(t); ^~~ ``` - -[subtype]: subtyping.html |
