File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
13
13
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
14
14
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
15
15
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16
- refs/heads/auto: ea92a5e90a4a88d10dcdd5647dfb906aaecadd21
16
+ refs/heads/auto: 69267b1e1d42c4c00ce2c478be8d8088f7a75283
17
17
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
18
18
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
19
19
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
Original file line number Diff line number Diff line change @@ -451,7 +451,7 @@ let x;
451
451
``` {ignore}
452
452
src/hello_world.rs:2:9: 2:10 error: cannot determine a type for this local variable: unconstrained type
453
453
src/hello_world.rs:2 let x;
454
- ^
454
+ ^
455
455
```
456
456
457
457
Giving it a type will compile, though:
@@ -477,7 +477,7 @@ but it will still print "Hello, world!":
477
477
Compiling hello_world v0.1.0 (file:/home/you/projects/hello_world)
478
478
src/hello_world.rs:2:9: 2:10 warning: unused variable: `x`, #[warn(unused_variable)] on by default
479
479
src/hello_world.rs:2 let x: int;
480
- ^
480
+ ^
481
481
```
482
482
483
483
Rust warns us that we never use the variable binding, but since we never use it,
@@ -499,7 +499,7 @@ $ cargo build
499
499
Compiling hello_world v0.1.0 (file:/home/you/projects/hello_world)
500
500
src/hello_world.rs:4:39: 4:40 error: use of possibly uninitialized variable: `x`
501
501
src/hello_world.rs:4 println!("The value of x is: {}", x);
502
- ^
502
+ ^
503
503
note: in expansion of format_args!
504
504
<std macros>:2:23: 2:77 note: expansion site
505
505
<std macros>:1:1: 3:2 note: in expansion of println!
You can’t perform that action at this time.
0 commit comments