Skip to content

Commit 9cb4350

Browse files
committed
Rollup merge of rust-lang#30871 - oli-obk:fix/reference, r=steveklabnik
r? @steveklabnik
2 parents 7893031 + 3ae71b1 commit 9cb4350

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/doc/reference.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -3677,10 +3677,10 @@ sites are:
36773677

36783678
* `let` statements where an explicit type is given.
36793679

3680-
For example, `128` is coerced to have type `i8` in the following:
3680+
For example, `42` is coerced to have type `i8` in the following:
36813681

36823682
```rust
3683-
let _: i8 = 128;
3683+
let _: i8 = 42;
36843684
```
36853685

36863686
* `static` and `const` statements (similar to `let` statements).
@@ -3690,36 +3690,36 @@ sites are:
36903690
The value being coerced is the actual parameter, and it is coerced to
36913691
the type of the formal parameter.
36923692

3693-
For example, `128` is coerced to have type `i8` in the following:
3693+
For example, `42` is coerced to have type `i8` in the following:
36943694

36953695
```rust
36963696
fn bar(_: i8) { }
36973697

36983698
fn main() {
3699-
bar(128);
3699+
bar(42);
37003700
}
37013701
```
37023702

37033703
* Instantiations of struct or variant fields
37043704

3705-
For example, `128` is coerced to have type `i8` in the following:
3705+
For example, `42` is coerced to have type `i8` in the following:
37063706

37073707
```rust
37083708
struct Foo { x: i8 }
37093709

37103710
fn main() {
3711-
Foo { x: 128 };
3711+
Foo { x: 42 };
37123712
}
37133713
```
37143714

37153715
* Function results, either the final line of a block if it is not
37163716
semicolon-terminated or any expression in a `return` statement
37173717

3718-
For example, `128` is coerced to have type `i8` in the following:
3718+
For example, `42` is coerced to have type `i8` in the following:
37193719

37203720
```rust
37213721
fn foo() -> i8 {
3722-
128
3722+
42
37233723
}
37243724
```
37253725

0 commit comments

Comments
 (0)