Skip to content

Commit 8ab22fa

Browse files
author
smenardpw
committed
---
yaml --- r: 152981 b: refs/heads/try2 c: f6f1cf1 h: refs/heads/master i: 152979: 245e3cf v: v3
1 parent 1d3dc32 commit 8ab22fa

File tree

448 files changed

+5390
-5796
lines changed

Some content is hidden

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

448 files changed

+5390
-5796
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 8bc286f9987963bd40465905a2c89098f0e10601
8+
refs/heads/try2: f6f1cf13d03fc3c5261fa84d08c26a386145c9ac
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/README.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,26 +54,10 @@ documentation.
5454
When complete, `make install` will place several programs into
5555
`/usr/local/bin`: `rustc`, the Rust compiler, and `rustdoc`, the
5656
API-documentation tool.
57+
system.
5758
3. Read the [tutorial].
5859
4. Enjoy!
5960

60-
### Building on Windows
61-
62-
To easily build on windows we can use [MSYS2](http://sourceforge.net/projects/msys2/):
63-
64-
1. Grab the latest MSYS2 installer and go through the installer.
65-
2. Now from the MSYS2 terminal we want to install the mingw64 toolchain and the other
66-
tools we need.
67-
68-
$ pacman -S mingw-w64-i686-toolchain
69-
$ pacman -S base-devel
70-
71-
3. With that now start `mingw32_shell.bat` from where you installed MSYS2 (i.e. `C:\msys`).
72-
4. From there just navigate to where you have Rust's source code, configure and build it:
73-
74-
$ ./configure --build=i686-pc-mingw32
75-
$ make && make install
76-
7761
[repo]: https://github.com/rust-lang/rust
7862
[tarball]: http://static.rust-lang.org/dist/rust-nightly.tar.gz
7963
[tutorial]: http://doc.rust-lang.org/tutorial.html

branches/try2/man/rustdoc.1

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,6 @@ directory to load plugins from (default: /tmp/rustdoc_ng/plugins)
3838
-L --library-path <val>
3939
directory to add to crate search path
4040
.TP
41-
--html-in-header <val>
42-
file to add to <head>
43-
.TP
44-
--html-before-content <val>
45-
file to add in <body>, before content
46-
.TP
47-
--html-after-content <val>
48-
file to add in <body>, after content
49-
.TP
5041
-h, --help
5142
Print help
5243

branches/try2/mk/dist.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ PKG_FILES := \
5454
driver \
5555
etc \
5656
$(foreach crate,$(CRATES),lib$(crate)) \
57-
libcoretest \
5857
libbacktrace \
5958
rt \
6059
rustllvm \

branches/try2/mk/docs.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
3535
PDF_DOCS := tutorial rust
3636

3737
RUSTDOC_DEPS_rust := doc/full-toc.inc
38-
RUSTDOC_FLAGS_rust := --html-in-header=doc/full-toc.inc
38+
RUSTDOC_FLAGS_rust := --markdown-in-header=doc/full-toc.inc
3939

4040
L10N_LANGS := ja
4141

4242
# Generally no need to edit below here.
4343

4444
# The options are passed to the documentation generators.
45-
RUSTDOC_HTML_OPTS_NO_CSS = --html-before-content=doc/version_info.html \
46-
--html-in-header=doc/favicon.inc \
47-
--html-after-content=doc/footer.inc \
45+
RUSTDOC_HTML_OPTS_NO_CSS = --markdown-before-content=doc/version_info.html \
46+
--markdown-in-header=doc/favicon.inc \
47+
--markdown-after-content=doc/footer.inc \
4848
--markdown-playground-url='http://play.rust-lang.org/'
4949

5050
RUSTDOC_HTML_OPTS = $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css rust.css

branches/try2/mk/tests.mk

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@
1414
######################################################################
1515

1616
# The names of crates that must be tested
17-
18-
# libcore tests are in a separate crate
19-
DEPS_coretest :=
20-
$(eval $(call RUST_CRATE,coretest))
21-
22-
TEST_TARGET_CRATES = $(filter-out core,$(TARGET_CRATES)) coretest
17+
TEST_TARGET_CRATES = $(TARGET_CRATES)
2318
TEST_DOC_CRATES = $(DOC_CRATES)
2419
TEST_HOST_CRATES = $(HOST_CRATES)
2520
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
@@ -177,7 +172,7 @@ check-notidy: cleantmptestlogs cleantestlibs all check-stage2
177172
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
178173

179174
check-lite: cleantestlibs cleantmptestlogs \
180-
$(foreach crate,$(TEST_TARGET_CRATES),check-stage2-$(crate)) \
175+
$(foreach crate,$(TARGET_CRATES),check-stage2-$(crate)) \
181176
check-stage2-rpass \
182177
check-stage2-rfail check-stage2-cfail check-stage2-rmake
183178
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log

branches/try2/src/doc/guide-unsafe.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,12 @@ impl<T: Send> Drop for Unique<T> {
267267
// A comparison between the built-in `Box` and this reimplementation
268268
fn main() {
269269
{
270-
let mut x = box 5i;
270+
let mut x = box 5;
271271
*x = 10;
272272
} // `x` is freed here
273273
274274
{
275-
let mut y = Unique::new(5i);
275+
let mut y = Unique::new(5);
276276
*y.borrow_mut() = 10;
277277
} // `y` is freed here
278278
}
@@ -678,7 +678,7 @@ unsafe fn deallocate(ptr: *mut u8, _size: uint, _align: uint) {
678678
679679
#[start]
680680
fn main(argc: int, argv: *const *const u8) -> int {
681-
let x = box 1i;
681+
let x = box 1;
682682
683683
0
684684
}

branches/try2/src/doc/guide.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Save the file, and then type this into your terminal window:
160160

161161
```{bash}
162162
$ rustc hello_world.rs
163-
$ ./hello_world # just 'hello_world' on Windows
163+
$ ./hello_world # or hello_world.exe on Windows
164164
Hello, world
165165
```
166166

@@ -243,7 +243,7 @@ There are now two files: our source code, with the `.rs` extension, and the
243243
executable (`hello_world.exe` on Windows, `hello_world` everywhere else)
244244

245245
```{bash}
246-
$ ./hello_world # or ./hello_world.exe on Windows
246+
$ ./hello_world # or hello_world.exe on Windows
247247
```
248248

249249
This prints out our `Hello, world!` text to our terminal.
@@ -285,9 +285,8 @@ At first, your program doesn't have any dependencies, so we'll only be using
285285
the first part of its functionality. Eventually, we'll add more. Since we
286286
started off by using Cargo, it'll be easy to add later.
287287

288-
Let's convert Hello World to Cargo. The first thing we need to do to begin using Cargo
289-
is to install Cargo. To do this, we need to build it from source. There are no binaries
290-
yet.
288+
Let's convert Hello World to Cargo. The first thing we need to do is install
289+
it. To do this, we need to build it from source. There are no binaries yet.
291290

292291
First, let's go back to our projects directory. We don't want Cargo to
293292
live in our project!

branches/try2/src/doc/intro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Check it out:
133133
```
134134
135135
fn dangling() -> Box<int> {
136-
let i = box 1234i;
136+
let i = box 1234;
137137
return i;
138138
}
139139
@@ -143,16 +143,16 @@ fn add_one() -> int {
143143
}
144144
```
145145

146-
Now instead of a stack allocated `1234i`,
147-
we have a heap allocated `box 1234i`.
146+
Now instead of a stack allocated `1234`,
147+
we have a heap allocated `box 1234`.
148148
Whereas `&` borrows a pointer to existing memory,
149149
creating an owned box allocates memory on the heap and places a value in it,
150150
giving you the sole pointer to that memory.
151151
You can roughly compare these two lines:
152152

153153
```
154154
// Rust
155-
let i = box 1234i;
155+
let i = box 1234;
156156
```
157157

158158
```cpp

branches/try2/src/doc/rust.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -442,14 +442,17 @@ of integer literal suffix:
442442
The type of an _unsuffixed_ integer literal is determined by type inference.
443443
If an integer type can be _uniquely_ determined from the surrounding program
444444
context, the unsuffixed integer literal has that type. If the program context
445-
underconstrains the type, it is considered a static type error;
446-
if the program context overconstrains the type,
447-
it is also considered a static type error.
445+
underconstrains the type, the unsuffixed integer literal's type is `int`; if
446+
the program context overconstrains the type, it is considered a static type
447+
error.
448448

449449
Examples of integer literals of various forms:
450450

451451
~~~~
452-
123i; // type int
452+
123; 0xff00; // type determined by program context
453+
// defaults to int in absence of type
454+
// information
455+
453456
123u; // type uint
454457
123_u; // type uint
455458
0xff_u8; // type u8
@@ -466,19 +469,17 @@ A _floating-point literal_ has one of two forms:
466469
second decimal literal.
467470
* A single _decimal literal_ followed by an _exponent_.
468471

469-
By default, a floating-point literal has a generic type,
470-
and, like integer literals, the type must be uniquely determined
471-
from the context.
472-
A floating-point literal may be followed (immediately, without any
472+
By default, a floating-point literal has a generic type, but will fall back to
473+
`f64`. A floating-point literal may be followed (immediately, without any
473474
spaces) by a _floating-point suffix_, which changes the type of the literal.
474475
There are two floating-point suffixes: `f32`, and `f64` (the 32-bit and 64-bit
475476
floating point types).
476477

477478
Examples of floating-point literals of various forms:
478479

479480
~~~~
480-
123.0f64; // type f64
481-
0.1f64; // type f64
481+
123.0; // type f64
482+
0.1; // type f64
482483
0.1f32; // type f32
483484
12E+99_f64; // type f64
484485
~~~~
@@ -2699,9 +2700,9 @@ must be a constant expression that can be evaluated at compile time, such
26992700
as a [literal](#literals) or a [static item](#static-items).
27002701

27012702
~~~~
2702-
[1i, 2, 3, 4];
2703+
[1, 2, 3, 4];
27032704
["a", "b", "c", "d"];
2704-
[0i, ..128]; // vector with 128 zeros
2705+
[0, ..128]; // vector with 128 zeros
27052706
[0u8, 0u8, 0u8, 0u8];
27062707
~~~~
27072708

@@ -2880,7 +2881,7 @@ equals sign (`=`) and an [rvalue](#lvalues-rvalues-and-temporaries) expression.
28802881
Evaluating an assignment expression [either copies or moves](#moved-and-copied-types) its right-hand operand to its left-hand operand.
28812882

28822883
~~~~
2883-
# let mut x = 0i;
2884+
# let mut x = 0;
28842885
# let y = 0;
28852886
28862887
x = y;
@@ -2931,7 +2932,7 @@ paren_expr : '(' expr ')' ;
29312932
An example of a parenthesized expression:
29322933

29332934
~~~~
2934-
let x: int = (2 + 3) * 4;
2935+
let x = (2 + 3) * 4;
29352936
~~~~
29362937

29372938

@@ -3015,7 +3016,7 @@ conditional expression evaluates to `false`, the `while` expression completes.
30153016
An example:
30163017

30173018
~~~~
3018-
let mut i = 0u;
3019+
let mut i = 0;
30193020
30203021
while i < 10 {
30213022
println!("hello");
@@ -3261,7 +3262,7 @@ Patterns can also dereference pointers by using the `&`,
32613262
on `x: &int` are equivalent:
32623263

32633264
~~~~
3264-
# let x = &3i;
3265+
# let x = &3;
32653266
let y = match *x { 0 => "zero", _ => "some" };
32663267
let z = match x { &0 => "zero", _ => "some" };
32673268
@@ -3284,7 +3285,7 @@ A range of values may be specified with `..`.
32843285
For example:
32853286

32863287
~~~~
3287-
# let x = 2i;
3288+
# let x = 2;
32883289
32893290
let message = match x {
32903291
0 | 1 => "not many",

branches/try2/src/doc/rustdoc.md

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,6 @@ rustdoc can also generate JSON, for consumption by other tools, with
103103
`rustdoc --output-format json`, and also consume already-generated JSON with
104104
`rustdoc --input-format json`.
105105

106-
rustdoc also supports personalizing the output from crates' documentation,
107-
similar to markdown options.
108-
109-
- `--html-in-header FILE`: includes the contents of `FILE` at the
110-
end of the `<head>...</head>` section.
111-
- `--html-before-content FILE`: includes the contents of `FILE`
112-
directly after `<body>`, before the rendered content (including the
113-
search bar).
114-
- `--html-after-content FILE`: includes the contents of `FILE`
115-
after all the rendered content.
116-
117106
# Using the Documentation
118107

119108
The web pages generated by rustdoc present the same logical hierarchy that one
@@ -249,16 +238,16 @@ detected by a `.md` or `.markdown` extension.
249238
There are 4 options to modify the output that Rustdoc creates.
250239

251240
- `--markdown-css PATH`: adds a `<link rel="stylesheet">` tag pointing to `PATH`.
252-
- `--html-in-header FILE`: includes the contents of `FILE` at the
241+
- `--markdown-in-header FILE`: includes the contents of `FILE` at the
253242
end of the `<head>...</head>` section.
254-
- `--html-before-content FILE`: includes the contents of `FILE`
243+
- `--markdown-before-content FILE`: includes the contents of `FILE`
255244
directly after `<body>`, before the rendered content (including the
256245
title).
257-
- `--html-after-content FILE`: includes the contents of `FILE`
246+
- `--markdown-after-content FILE`: includes the contents of `FILE`
258247
directly before `</body>`, after all the rendered content.
259248

260249
All of these can be specified multiple times, and they are output in
261-
the order in which they are specified. The first line of the file being rendered must
250+
the order in which they are specified. The first line of the file must
262251
be the title, prefixed with `%` (e.g. this page has `% Rust
263252
Documentation` on the first line).
264253

0 commit comments

Comments
 (0)