Skip to content

Commit 93fbb59

Browse files
committed
---
yaml --- r: 93687 b: refs/heads/try c: 0d11935 h: refs/heads/master i: 93685: 219cc7c 93683: 78a62d4 93679: 3d05441 v: v3
1 parent f8ef16a commit 93fbb59

Some content is hidden

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

59 files changed

+646
-546
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: 91de538c9802e7c45cadc5391450631c74f593d2
5+
refs/heads/try: 0d11935bf6ae3e784aefb1c359a70fea5dfd3d00
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,4 @@ config.stamp
8989
src/etc/dl
9090
.settings/
9191
build/
92+
i686-pc-mingw32/

branches/try/doc/favicon.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico" />

branches/try/doc/manual.inc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@
44
display: block;
55
padding-left: 2em;
66
}
7-
</style>
7+
#influences blockquote p:last-child {
8+
display: block;
9+
line-height: 1.428571429;
10+
color: #999999;
11+
}
12+
</style>

branches/try/doc/rust.css

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright 2013 The Rust Project Developers. See the COPYRIGHT
33
* file at the top-level directory of this distribution and at
44
* http://rust-lang.org/COPYRIGHT.
5-
* With elements taken from Bootstrap v3.0.0 (Apache v2.0 licensed).
5+
* With elements taken from Bootstrap v3.0.2 (MIT licensed).
66
*
77
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
88
* http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
@@ -93,6 +93,7 @@ p {
9393
a {
9494
text-decoration: none;
9595
color: #428BCA;
96+
background: transparent;
9697
}
9798
a:hover, a:focus {
9899
color: #2A6496;
@@ -114,7 +115,7 @@ h5 a:link, h5 a:visited {color: black;}
114115
/* Code
115116
========================================================================== */
116117
pre, code {
117-
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
118+
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
118119
border-radius: 4px;
119120
}
120121
pre {
@@ -141,7 +142,7 @@ pre code {
141142
color: inherit;
142143
white-space: pre-wrap;
143144
background-color: transparent;
144-
border: 0;
145+
border-radius: 0;
145146
}
146147

147148
/* Code highlighting */
@@ -158,7 +159,7 @@ pre code {
158159
.cm-s-default span.cm-string {color: #a11;}
159160
.cm-s-default span.cm-string-2 {color: #f50;}
160161
.cm-s-default span.cm-meta {color: #555;}
161-
.cm-s-default span.cm-error {color: #f00;}
162+
/*.cm-s-default span.cm-error {color: #f00;}*/
162163
.cm-s-default span.cm-qualifier {color: #555;}
163164
.cm-s-default span.cm-builtin {color: #30a;}
164165
.cm-s-default span.cm-bracket {color: #cc7;}
@@ -187,7 +188,7 @@ pre code {
187188
}
188189
#versioninfo a.hash {
189190
color: gray;
190-
font-size: 60%;
191+
font-size: 70%;
191192
}
192193

193194
blockquote {
@@ -303,4 +304,4 @@ hr {
303304
table td, table th {
304305
background-color: #fff !important;
305306
}
306-
}
307+
}

branches/try/doc/rustpkg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Thus, there should be no need to pass a `-L` flag to rustpkg to tell it where to
120120

121121
# Custom build scripts
122122

123-
A file called `pkg.rs` at the root level in a workspace is called a *package script*.
123+
A file called `pkg.rs` at the root level in a package directory is called a *package script*.
124124
If a package script exists, rustpkg executes it to build the package
125125
rather than inferring crates as described previously.
126126

branches/try/doc/tutorial-ffi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ conventions. Rust provides a way to tell the compiler which convention to use:
303303
#[cfg(target_os = "win32", target_arch = "x86")]
304304
#[link_name = "kernel32"]
305305
extern "stdcall" {
306-
fn SetEnvironmentVariableA(n: *u8, v: *u8) -> int;
306+
fn SetEnvironmentVariableA(n: *u8, v: *u8) -> std::libc::c_int;
307307
}
308308
~~~~
309309

branches/try/doc/tutorial-macros.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ solves the problem.
210210

211211
# Macro argument pattern matching
212212

213-
Now consider code like the following:
214-
215213
## Motivation
216214

215+
Now consider code like the following:
216+
217217
~~~~
218218
# enum t1 { good_1(t2, uint), bad_1 };
219219
# pub struct t2 { body: t3 }

branches/try/doc/tutorial-rustpkg.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ $ rustc main.rs
2727
main.rs:1:0: 1:17 error: can't find crate for `hello`
2828
main.rs:1 extern mod hello;
2929
^~~~~~~~~~~~~~~~~
30-
3130
~~~~
3231

3332
This makes sense, as we haven't gotten it from anywhere yet! Luckily for us,
@@ -216,7 +215,7 @@ a function that can be sensibly tested:
216215
#[license = "MIT"];
217216
218217
pub fn is_even(i: uint) -> bool {
219-
i % 2 == 0
218+
i % 2 == 0
220219
}
221220
~~~
222221

@@ -230,9 +229,9 @@ use hello::is_even;
230229
231230
#[test]
232231
fn test_is_even() {
233-
assert!(is_even(0));
234-
assert!(!is_even(1));
235-
assert!(is_even(2));
232+
assert!(is_even(0));
233+
assert!(!is_even(1));
234+
assert!(is_even(2));
236235
}
237236
~~~
238237

branches/try/doc/tutorial-tasks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ an environment that it carries across tasks.
104104
let child_task_number = generate_task_number();
105105
106106
do spawn {
107-
// Capture it in the remote task
108-
println!("I am child number {}", child_task_number);
107+
// Capture it in the remote task
108+
println!("I am child number {}", child_task_number);
109109
}
110110
~~~
111111

branches/try/doc/tutorial.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ confusing numbers that correspond to different units.
804804
We've already seen several function definitions. Like all other static
805805
declarations, such as `type`, functions can be declared both at the
806806
top level and inside other functions (or in modules, which we'll come
807-
back to [later](#modules-and-crates)). The `fn` keyword introduces a
807+
back to [later](#crates-and-the-module-system)). The `fn` keyword introduces a
808808
function. A function has an argument list, which is a parenthesized
809809
list of `expr: type` pairs separated by commas. An arrow `->`
810810
separates the argument list and the function's return type.
@@ -2550,18 +2550,21 @@ fn main() {
25502550
~~~~
25512551

25522552
And here an example with multiple files:
2553+
25532554
~~~{.ignore}
25542555
// a.rs - crate root
25552556
use b::foo;
25562557
mod b;
25572558
fn main() { foo(); }
25582559
~~~
2560+
25592561
~~~{.ignore}
25602562
// b.rs
25612563
use b::c::bar;
25622564
pub mod c;
25632565
pub fn foo() { bar(); }
25642566
~~~
2567+
25652568
~~~
25662569
// c.rs
25672570
pub fn bar() { println("Baz!"); }
@@ -2711,10 +2714,10 @@ extend with the `-L` switch).
27112714
However, Rust also ships with rustpkg, a package manager that is able to automatically download and build
27122715
libraries if you use it for building your crate. How it works is explained [here][rustpkg],
27132716
but for this tutorial it's only important to know that you can optionally annotate an
2714-
`extern mod` statement with an package id that rustpkg can use to identify it:
2717+
`extern mod` statement with a package id that rustpkg can use to identify it:
27152718

27162719
~~~ {.ignore}
2717-
extern mod rust = "github.com/mozilla/rust"; // pretend Rust is an simple library
2720+
extern mod rust = "github.com/mozilla/rust"; // pretend Rust is a simple library
27182721
~~~
27192722

27202723
[rustpkg]: rustpkg.html
@@ -2730,7 +2733,7 @@ the link name and the version. It also hashes the filename and the symbols in a
27302733
based on the link metadata, allowing you to use two different versions of the same library in a crate
27312734
without conflict.
27322735

2733-
Therefor, if you plan to compile your crate as a library, you should annotate it with that information:
2736+
Therefore, if you plan to compile your crate as a library, you should annotate it with that information:
27342737

27352738
~~~~
27362739
// lib.rs
@@ -2746,8 +2749,8 @@ Therefor, if you plan to compile your crate as a library, you should annotate it
27462749
You can also in turn require in a `extern mod` statement that certain link metadata items match some criteria.
27472750
For that, Rust currently parses a comma-separated list of name/value pairs that appear after
27482751
it, and ensures that they match the attributes provided in the `link` attribute of a crate file.
2749-
This enables you to, eg, pick a a crate based on it's version number, or to link an library under an
2750-
different name. For example, this two mod statements would both accept and select the crate define above:
2752+
This enables you to, e.g., pick a crate based on its version number, or link a library under a
2753+
different name. For example, these two `mod` statements would both accept and select the crate define above:
27512754

27522755
~~~~ {.xfail-test}
27532756
extern mod farm(vers = "2.5");
@@ -2836,14 +2839,14 @@ This allows you to use common types and functions like `Option<T>` or `println`
28362839
without needing to import them. And if you need something from `std` that's not in the prelude,
28372840
you just have to import it with an `use` statement.
28382841

2839-
For example, it re-exports `println` which is defined in `std::io::println`:
2842+
For example, it re-exports `println` which is defined in `std::io::stdio::println`:
28402843

28412844
~~~
28422845
use puts = std::io::stdio::println;
28432846
28442847
fn main() {
28452848
println("println is imported per default.");
2846-
puts("Doesn't hinder you from importing it under an different name yourself.");
2849+
puts("Doesn't hinder you from importing it under a different name yourself.");
28472850
::std::io::stdio::println("Or from not using the automatic import.");
28482851
}
28492852
~~~

0 commit comments

Comments
 (0)