Skip to content

Commit 6d4c22f

Browse files
committed
---
yaml --- r: 127090 b: refs/heads/snap-stage3 c: 867d8e6 h: refs/heads/master v: v3
1 parent 9cda317 commit 6d4c22f

File tree

41 files changed

+179
-353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+179
-353
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 7be8f0af0393dcdb077c2f6b1653836fd3fba235
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: ce01b4b1b7a9df49ab6bc7c5eaf0b2f95a799a1b
4+
refs/heads/snap-stage3: 867d8e63564ccca9c060e5bf308c980a28016550
55
refs/heads/try: 502e4c045236682e9728539dc0d2b3d0b237f55c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/.gitignore

Lines changed: 64 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,90 @@
1-
*.a
2-
*.aux
3-
*.bc
1+
*~
2+
\#*\#
3+
\#*
4+
.#*
5+
*.x86
6+
*.llvm
7+
*.out
48
*.boot
5-
*.bz2
6-
*.cmi
7-
*.cmo
9+
*.rustc
810
*.cmx
9-
*.cp
10-
*.cps
11-
*.d
12-
*.dSYM
13-
*.def
14-
*.diff
1511
*.dll
16-
*.dylib
17-
*.elc
18-
*.epub
12+
*.def
1913
*.exe
14+
*.a
15+
*.rlib
16+
*.so
17+
*.dylib
18+
*.orig
19+
*.cmo
20+
*.cmi
21+
*.dSYM
22+
*.d
23+
*.o
24+
*.ll
25+
*.bc
26+
*.aux
27+
*.cp
2028
*.fn
21-
*.html
2229
*.ky
23-
*.ll
24-
*.llvm
30+
*.cps
2531
*.log
26-
*.o
27-
*.orig
28-
*.out
29-
*.patch
3032
*.pdf
33+
*.epub
34+
*.html
3135
*.pg
32-
*.pot
33-
*.pyc
34-
*.rej
35-
*.rlib
36-
*.rustc
37-
*.so
38-
*.swo
39-
*.swp
40-
*.tmp
4136
*.toc
4237
*.tp
4338
*.vr
44-
*.x86
45-
*~
46-
.#*
47-
.DS_Store
48-
.cproject
39+
*.patch
40+
*.diff
41+
*.rej
42+
*.swp
43+
*.swo
44+
*.tmp
45+
*.pyc
46+
*.elc
4947
.hg/
5048
.hgignore
49+
.cproject
5150
.project
52-
.settings/
5351
.valgrindrc
54-
/*-*-*-*/
55-
/*-*-*/
52+
lexer.ml
53+
TAGS
54+
TAGS.emacs
55+
TAGS.vi
56+
version.ml
57+
version.texi
5658
/Makefile
57-
/build
58-
/dist/
59-
/dl/
60-
/doc
61-
/inst/
62-
/llvm/
63-
/mingw-build/
64-
/nd/
59+
config.mk
6560
/rt/
6661
/rustllvm/
62+
/test/
63+
/inst/
64+
/mingw-build/
65+
src/.DS_Store
66+
/tmp/
67+
/dist/
6768
/stage0/
69+
/dl/
6870
/stage1/
6971
/stage2/
7072
/stage3/
71-
/test/
72-
/tmp/
73-
TAGS
74-
TAGS.emacs
75-
TAGS.vi
76-
\#*
77-
\#*\#
78-
config.mk
79-
config.stamp
73+
*.bz2
74+
/doc
75+
/nd/
76+
/llvm/
77+
version.md
8078
keywords.md
81-
lexer.ml
82-
src/.DS_Store
79+
x86_64-apple-darwin/
80+
x86_64-unknown-linux-gnu/
81+
i686-unknown-linux-gnu/
82+
tmp.*.rs
83+
config.stamp
84+
.DS_Store
8385
src/etc/dl
86+
.settings/
87+
/build
88+
i686-pc-mingw32/
8489
src/librustc_llvm/llvmdeps.rs
85-
tmp.*.rs
86-
version.md
87-
version.ml
88-
version.texi
90+
*.pot

branches/snap-stage3/mk/docs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ doc/$(1)/:
285285
$(2) += doc/$(1)/index.html
286286
doc/$(1)/index.html: CFG_COMPILER_HOST_TRIPLE = $(CFG_TARGET)
287287
doc/$(1)/index.html: $$(LIB_DOC_DEP_$(1)) doc/$(1)/
288-
@$$(call E, rustdoc: $$@)
288+
@$$(call E, rustdoc $$@)
289289
$$(Q)$$(RUSTDOC) --cfg dox --cfg stage2 $$<
290290
endef
291291

branches/snap-stage3/src/compiletest/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub struct Config {
136136
// Extra parameter to run adb on arm-linux-androideabi
137137
pub adb_path: String,
138138

139-
// Extra parameter to run test suite on arm-linux-androideabi
139+
// Extra parameter to run test sute on arm-linux-androideabi
140140
pub adb_test_dir: String,
141141

142142
// status whether android device available or not

branches/snap-stage3/src/compiletest/runtest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
325325
let DebuggerCommands { commands, check_lines, .. } = parse_debugger_commands(testfile, "gdb");
326326
let mut cmds = commands.connect("\n");
327327

328-
// compile test file (it should have 'compile-flags:-g' in the header)
328+
// compile test file (it shoud have 'compile-flags:-g' in the header)
329329
let compiler_run_result = compile_test(config, props, testfile);
330330
if !compiler_run_result.status.success() {
331331
fatal_proc_rec("compilation failed!", &compiler_run_result);
@@ -520,7 +520,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
520520

521521
let config = &mut config;
522522

523-
// compile test file (it should have 'compile-flags:-g' in the header)
523+
// compile test file (it shoud have 'compile-flags:-g' in the header)
524524
let compile_result = compile_test(config, props, testfile);
525525
if !compile_result.status.success() {
526526
fatal_proc_rec("compilation failed!", &compile_result);

branches/snap-stage3/src/doc/complement-design-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% The Rust Design FAQ
1+
% Rust Design FAQ
22

33
This document describes decisions were arrived at after lengthy discussion and
44
experimenting with alternatives. Please do not propose reversing them unless

branches/snap-stage3/src/doc/complement-lang-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% The Rust Language FAQ
1+
% Language FAQ
22

33
## Are there any big programs written in it yet? I want to read big samples.
44

branches/snap-stage3/src/doc/complement-project-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% The Rust Project FAQ
1+
% Project FAQ
22

33
# What is this project's goal, in one sentence?
44

branches/snap-stage3/src/doc/guide-strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% The Guide to Rust Strings
1+
% The Strings Guide
22

33
Strings are an important concept to master in any programming language. If you
44
come from a managed language background, you may be surprised at the complexity

branches/snap-stage3/src/doc/guide-unsafe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% Writing Unsafe and Low-Level Code in Rust
1+
% Writing Safe Unsafe and Low-Level Code
22

33
# Introduction
44

branches/snap-stage3/src/doc/guide.md

Lines changed: 53 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ Put this inside:
316316
317317
name = "hello_world"
318318
version = "0.1.0"
319-
authors = [ "Your name <you@example.com>" ]
319+
authors = [ "someone@example.com" ]
320320
321321
[[bin]]
322322
@@ -354,18 +354,6 @@ file, we would need to call `rustc` twice, and pass it a bunch of options to
354354
tell it to build everything together. With Cargo, as our project grows, we can
355355
just `cargo build` and it'll work the right way.
356356

357-
You'll also notice that Cargo has created a new file: `Cargo.lock`.
358-
359-
```{ignore,notrust}
360-
[root]
361-
name = "hello_world"
362-
version = "0.0.1"
363-
```
364-
365-
This file is used by Cargo to keep track of dependencies in your application.
366-
Right now, we don't have any, so it's a bit sparse. You won't ever need
367-
to touch this file yourself, just let Cargo handle it.
368-
369357
That's it! We've successfully built `hello_world` with Cargo. Even though our
370358
program is simple, it's using much of the real tooling that you'll use for the
371359
rest of your Rust career.
@@ -1060,7 +1048,6 @@ you create a new type that's a synonym for another one:
10601048

10611049
```
10621050
struct Inches(int);
1063-
struct Centimeters(int);
10641051
10651052
let length = Inches(10);
10661053
@@ -1606,45 +1593,41 @@ taken to the screen. Sound good?
16061593

16071594
## Set up
16081595

1609-
Let's set up a new project. Go to your projects directory. Remember how we
1610-
had to create our directory structure and a `Cargo.toml` for `hello_world`? Cargo
1611-
has a command that does that for us. Let's give it a shot:
1596+
Let's set up a new project. Go to your projects directory, and make a new
1597+
directory for the project, as well as a `src` directory for our code:
16121598

16131599
```{bash}
16141600
$ cd ~/projects
1615-
$ cargo new guessing_game --bin
1601+
$ mkdir guessing_game
16161602
$ cd guessing_game
1603+
$ mkdir src
16171604
```
16181605

1619-
We pass the name of our project to `cargo new`, and then the `--bin` flag,
1620-
since we're making a binary, rather than a library.
1621-
1622-
Check out the generated `Cargo.toml`:
1606+
Great. Next, let's make a `Cargo.toml` file so Cargo knows how to build our
1607+
project:
16231608

16241609
```{ignore}
16251610
[package]
16261611
16271612
name = "guessing_game"
16281613
version = "0.1.0"
1629-
authors = ["Your Name <you@example.com>"]
1614+
authors = [ "someone@example.com" ]
16301615
16311616
[[bin]]
16321617
16331618
name = "guessing_game"
16341619
```
16351620

1636-
Cargo gets this information from your environment. If it's not correct, go ahead
1637-
and fix that.
1638-
1639-
Finally, Cargo generated a hello, world for us. Check out `src/main.rs`:
1621+
Finally, we need our source file. Let's just make it hello world for now, so we
1622+
can check that our setup works. In `src/guessing_game.rs`:
16401623

16411624
```{rust}
16421625
fn main() {
16431626
println!("Hello world!");
16441627
}
16451628
```
16461629

1647-
Let's try compiling what Cargo gave us:
1630+
Let's make sure that worked:
16481631

16491632
```{bash}
16501633
$ cargo build
@@ -1899,6 +1882,7 @@ fn cmp(a: int, b: int) -> Ordering {
18991882
If we try to compile, we'll get some errors:
19001883

19011884
```{notrust,ignore}
1885+
$ cargo build
19021886
$ cargo build
19031887
Compiling guessing_game v0.1.0 (file:/home/you/projects/guessing_game)
19041888
src/guessing_game.rs:20:15: 20:20 error: mismatched types: expected `int` but found `collections::string::String` (expected int but found struct collections::string::String)
@@ -2501,7 +2485,27 @@ Enough talk, let's build something! Let's make a new project called `modules`.
25012485

25022486
```{bash,ignore}
25032487
$ cd ~/projects
2504-
$ cargo new modules --bin
2488+
$ mkdir modules
2489+
$ cd modules
2490+
$ mkdir src
2491+
```
2492+
2493+
We need to make our two 'hello world' files. In `src/main.rs`:
2494+
2495+
```{rust}
2496+
fn main() {
2497+
println!("Hello, world!");
2498+
}
2499+
```
2500+
2501+
And in `Cargo.toml`:
2502+
2503+
```{notrust,ignore}
2504+
[package]
2505+
2506+
name = "modules"
2507+
version = "0.1.0"
2508+
authors = [ "[email protected]" ]
25052509
```
25062510

25072511
Let's double check our work by compiling:
@@ -2919,16 +2923,34 @@ now: make a new project:
29192923

29202924
```{bash,ignore}
29212925
$ cd ~/projects
2922-
$ cargo new testing --bin
2926+
$ mkdir testing
29232927
$ cd testing
2928+
$ mkdir test
2929+
```
2930+
2931+
In `src/main.rs`:
2932+
2933+
```{rust}
2934+
fn main() {
2935+
println!("Hello, world!");
2936+
}
2937+
```
2938+
2939+
And in `Cargo.toml`:
2940+
2941+
```{notrust,ignore}
2942+
[package]
2943+
2944+
name = "testing"
2945+
version = "0.1.0"
2946+
authors = [ "[email protected]" ]
29242947
```
29252948

29262949
And try it out:
29272950

29282951
```{notrust,ignore}
29292952
$ cargo run
29302953
Compiling testing v0.1.0 (file:/home/you/projects/testing)
2931-
Running `target/testing`
29322954
Hello, world!
29332955
$
29342956
```

0 commit comments

Comments
 (0)