We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f53c6a6 commit d97d111Copy full SHA for d97d111
src/type-inference.md
@@ -6,14 +6,14 @@ expression.
6
It is what allows Rust to work with fewer or no type annotations,
7
making things easier for users:
8
9
-```rust,ignore
+```rust
10
fn main() {
11
let mut things = vec![];
12
- things.push("thing")
+ things.push("thing");
13
}
14
```
15
16
-Here, the type of `things` is *inferenced* to be `&str` because that's the value
+Here, the type of `things` is *inferred* to be `Vec<&str>` because of the value
17
we push into `things`.
18
19
The type inference is based on the standard Hindley-Milner (HM) type inference
0 commit comments