Skip to content

Commit 8236c2e

Browse files
authored
Merge pull request #1160 from mikong/place-value-expressions
Replace lvalue and rvalue with place and value
2 parents 8899358 + 4d0848b commit 8236c2e

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/expression.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ fn main() {
2525
}
2626
```
2727

28-
Blocks are expressions too, so they can be used as [r-values][rvalue] in
28+
Blocks are expressions too, so they can be used as values in
2929
assignments. The last expression in the block will be assigned to the
30-
[l-value][lvalue]. However, if the last expression of the block ends with a
30+
place expression such as a local variable. However, if the last expression of the block ends with a
3131
semicolon, the return value will be `()`.
3232

3333
```rust,editable
@@ -52,6 +52,3 @@ fn main() {
5252
println!("z is {:?}", z);
5353
}
5454
```
55-
56-
[rvalue]: https://en.wikipedia.org/wiki/Value_%28computer_science%29#lrvalue
57-
[lvalue]: https://en.wikipedia.org/wiki/Value_%28computer_science%29#lrvalue

src/types/inference.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Inference
22

33
The type inference engine is pretty smart. It does more than looking at the
4-
type of the
5-
[r-value][rvalue]
4+
type of the value expression
65
during an initialization. It also looks at how the variable is used afterwards
76
to infer its type. Here's an advanced example of type inference:
87

@@ -27,5 +26,3 @@ fn main() {
2726

2827
No type annotation of variables was needed, the compiler is happy and so is the
2928
programmer!
30-
31-
[rvalue]: https://en.wikipedia.org/wiki/Value_%28computer_science%29#lrvalue

0 commit comments

Comments
 (0)