about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorOliver 'ker' Schneider <rust19446194516@oli-obk.de>2015-12-28 19:55:56 +0100
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2016-01-13 14:50:04 +0100
commit3ae71b1b69e3bf9855deac8151e75fa7eba30206 (patch)
tree8d49105903dd3734e841f1365488333ebdaa40c4 /src
parent8796e012cbfa0bf63522e409edc10cbac5afaacd (diff)
downloadrust-3ae71b1b69e3bf9855deac8151e75fa7eba30206.tar.gz
rust-3ae71b1b69e3bf9855deac8151e75fa7eba30206.zip
the reference was inferring values that didn't fit into their target type
Diffstat (limited to 'src')
-rw-r--r--src/doc/reference.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md
index 5f71ee44379..87104b4526f 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -3677,10 +3677,10 @@ sites are:
 
 * `let` statements where an explicit type is given.
 
-   For example, `128` is coerced to have type `i8` in the following:
+   For example, `42` is coerced to have type `i8` in the following:
 
    ```rust
-   let _: i8 = 128;
+   let _: i8 = 42;
    ```
 
 * `static` and `const` statements (similar to `let` statements).
@@ -3690,36 +3690,36 @@ sites are:
   The value being coerced is the actual parameter, and it is coerced to
   the type of the formal parameter.
 
-  For example, `128` is coerced to have type `i8` in the following:
+  For example, `42` is coerced to have type `i8` in the following:
 
   ```rust
   fn bar(_: i8) { }
 
   fn main() {
-      bar(128);
+      bar(42);
   }
   ```
 
 * Instantiations of struct or variant fields
 
-  For example, `128` is coerced to have type `i8` in the following:
+  For example, `42` is coerced to have type `i8` in the following:
 
   ```rust
   struct Foo { x: i8 }
 
   fn main() {
-      Foo { x: 128 };
+      Foo { x: 42 };
   }
   ```
 
 * Function results, either the final line of a block if it is not
   semicolon-terminated or any expression in a `return` statement
 
-  For example, `128` is coerced to have type `i8` in the following:
+  For example, `42` is coerced to have type `i8` in the following:
 
   ```rust
   fn foo() -> i8 {
-      128
+      42
   }
   ```