Skip to content

Commit 6bd86d4

Browse files
author
Max Hausch
committed
Clarify type suffixing with example
I did not understand this principle the first time i read it. I tried `31 i64`, `31: i64` until i saw an example in the primitives chapter.
1 parent db57f89 commit 6bd86d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hello/print.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ some of which include:
99
* `eprint!`: same as `format!` but the text is printed to the standard error (io::stderr).
1010
* `eprintln!`: same as `eprint!`but a newline is appended.
1111

12-
All parse text in the same fashion. As a plus, Rust checks formatting
12+
All parse text in the same fashion. As a plus, Rust checks formatting
1313
correctness at compile time.
1414

1515
```rust,editable,ignore,mdbook-runnable
@@ -19,7 +19,7 @@ fn main() {
1919
println!("{} days", 31);
2020
2121
// Without a suffix, 31 becomes an i32. You can change what type 31 is
22-
// by providing a suffix.
22+
// by providing a suffix. The number 31i64 for example has the type i64.
2323
2424
// There are various optional patterns this works with. Positional
2525
// arguments can be used.

0 commit comments

Comments
 (0)