Skip to content

Commit ff1dd44

Browse files
committed
Merge remote-tracking branch 'origin/master' into 0.11.0-release
Conflicts: src/libstd/lib.rs
2 parents aa1163b + ca2778e commit ff1dd44

File tree

715 files changed

+10840
-8689
lines changed

Some content is hidden

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

715 files changed

+10840
-8689
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,26 @@ 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.
5857
3. Read the [tutorial].
5958
4. Enjoy!
6059

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+
6177
[repo]: https://github.com/rust-lang/rust
6278
[tarball]: http://static.rust-lang.org/dist/rust-nightly.tar.gz
6379
[tutorial]: http://doc.rust-lang.org/tutorial.html

man/rustdoc.1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ 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
4150
-h, --help
4251
Print help
4352

mk/dist.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ PKG_FILES := \
5454
driver \
5555
etc \
5656
$(foreach crate,$(CRATES),lib$(crate)) \
57+
libcoretest \
5758
libbacktrace \
5859
rt \
5960
rustllvm \

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 := --markdown-in-header=doc/full-toc.inc
38+
RUSTDOC_FLAGS_rust := --html-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 = --markdown-before-content=doc/version_info.html \
46-
--markdown-in-header=doc/favicon.inc \
47-
--markdown-after-content=doc/footer.inc \
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 \
4848
--markdown-playground-url='http://play.rust-lang.org/'
4949

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

mk/tests.mk

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

1616
# The names of crates that must be tested
17-
TEST_TARGET_CRATES = $(TARGET_CRATES)
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
1823
TEST_DOC_CRATES = $(DOC_CRATES)
1924
TEST_HOST_CRATES = $(HOST_CRATES)
2025
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
@@ -172,7 +177,7 @@ check-notidy: cleantmptestlogs cleantestlibs all check-stage2
172177
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
173178

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

src/compiletest/compiletest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub mod common;
4242
pub mod errors;
4343

4444
#[start]
45-
fn start(argc: int, argv: **u8) -> int {
45+
fn start(argc: int, argv: *const *const u8) -> int {
4646
green::start(argc, argv, rustuv::event_loop, main)
4747
}
4848

src/doc/guide-ffi.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@ use libc::{c_int, size_t};
5050
5151
#[link(name = "snappy")]
5252
extern {
53-
fn snappy_compress(input: *u8,
53+
fn snappy_compress(input: *const u8,
5454
input_length: size_t,
5555
compressed: *mut u8,
5656
compressed_length: *mut size_t) -> c_int;
57-
fn snappy_uncompress(compressed: *u8,
57+
fn snappy_uncompress(compressed: *const u8,
5858
compressed_length: size_t,
5959
uncompressed: *mut u8,
6060
uncompressed_length: *mut size_t) -> c_int;
6161
fn snappy_max_compressed_length(source_length: size_t) -> size_t;
62-
fn snappy_uncompressed_length(compressed: *u8,
62+
fn snappy_uncompressed_length(compressed: *const u8,
6363
compressed_length: size_t,
6464
result: *mut size_t) -> c_int;
65-
fn snappy_validate_compressed_buffer(compressed: *u8,
65+
fn snappy_validate_compressed_buffer(compressed: *const u8,
6666
compressed_length: size_t) -> c_int;
6767
}
6868
# fn main() {}
@@ -82,7 +82,7 @@ the allocated memory. The length is less than or equal to the capacity.
8282
~~~~
8383
# extern crate libc;
8484
# use libc::{c_int, size_t};
85-
# unsafe fn snappy_validate_compressed_buffer(_: *u8, _: size_t) -> c_int { 0 }
85+
# unsafe fn snappy_validate_compressed_buffer(_: *const u8, _: size_t) -> c_int { 0 }
8686
# fn main() {}
8787
pub fn validate_compressed_buffer(src: &[u8]) -> bool {
8888
unsafe {
@@ -106,7 +106,7 @@ the true length after compression for setting the length.
106106
~~~~
107107
# extern crate libc;
108108
# use libc::{size_t, c_int};
109-
# unsafe fn snappy_compress(a: *u8, b: size_t, c: *mut u8,
109+
# unsafe fn snappy_compress(a: *const u8, b: size_t, c: *mut u8,
110110
# d: *mut size_t) -> c_int { 0 }
111111
# unsafe fn snappy_max_compressed_length(a: size_t) -> size_t { a }
112112
# fn main() {}
@@ -132,11 +132,11 @@ format and `snappy_uncompressed_length` will retrieve the exact buffer size requ
132132
~~~~
133133
# extern crate libc;
134134
# use libc::{size_t, c_int};
135-
# unsafe fn snappy_uncompress(compressed: *u8,
135+
# unsafe fn snappy_uncompress(compressed: *const u8,
136136
# compressed_length: size_t,
137137
# uncompressed: *mut u8,
138138
# uncompressed_length: *mut size_t) -> c_int { 0 }
139-
# unsafe fn snappy_uncompressed_length(compressed: *u8,
139+
# unsafe fn snappy_uncompressed_length(compressed: *const u8,
140140
# compressed_length: size_t,
141141
# result: *mut size_t) -> c_int { 0 }
142142
# fn main() {}
@@ -418,7 +418,7 @@ Unsafe functions, on the other hand, advertise it to the world. An unsafe functi
418418
this:
419419
420420
~~~~
421-
unsafe fn kaboom(ptr: *int) -> int { *ptr }
421+
unsafe fn kaboom(ptr: *const int) -> int { *ptr }
422422
~~~~
423423
424424
This function can only be called from an `unsafe` block or another `unsafe` function.
@@ -453,7 +453,7 @@ use std::ptr;
453453
454454
#[link(name = "readline")]
455455
extern {
456-
static mut rl_prompt: *libc::c_char;
456+
static mut rl_prompt: *const libc::c_char;
457457
}
458458
459459
fn main() {
@@ -478,7 +478,7 @@ extern crate libc;
478478
#[link(name = "kernel32")]
479479
#[allow(non_snake_case_functions)]
480480
extern "stdcall" {
481-
fn SetEnvironmentVariableA(n: *u8, v: *u8) -> libc::c_int;
481+
fn SetEnvironmentVariableA(n: *const u8, v: *const u8) -> libc::c_int;
482482
}
483483
# fn main() { }
484484
~~~~

src/doc/guide-macros.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ macro_rules! biased_match_rec (
355355
_ => { $err }
356356
}
357357
);
358+
// Produce the requested values
358359
( binds $( $bind_res:ident ),* ) => ( ($( $bind_res ),*) )
359360
)
360361
@@ -364,7 +365,7 @@ macro_rules! biased_match (
364365
( $( ($e:expr) ~ ($p:pat) else $err:stmt ; )*
365366
binds $bind_res:ident
366367
) => (
367-
let ( $( $bind_res ),* ) = biased_match_rec!(
368+
let $bind_res = biased_match_rec!(
368369
$( ($e) ~ ($p) else $err ; )*
369370
binds $bind_res
370371
);

src/doc/guide-runtime.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ extern crate green;
245245
extern crate rustuv;
246246
247247
#[start]
248-
fn start(argc: int, argv: **u8) -> int {
248+
fn start(argc: int, argv: *const *const u8) -> int {
249249
green::start(argc, argv, rustuv::event_loop, main)
250250
}
251251
@@ -261,7 +261,9 @@ inside of an OS thread.
261261
extern crate native;
262262
263263
#[start]
264-
fn start(argc: int, argv: **u8) -> int { native::start(argc, argv, main) }
264+
fn start(argc: int, argv: *const *const u8) -> int {
265+
native::start(argc, argv, main)
266+
}
265267
266268
fn main() {}
267269
~~~

src/doc/guide-tasks.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ the string in response. The child terminates when it receives `0`.
457457
Here is the function that implements the child task:
458458

459459
~~~
460+
#![allow(deprecated)]
461+
460462
use std::comm::DuplexStream;
461463
# fn main() {
462464
fn stringifier(channel: &DuplexStream<String, uint>) {
@@ -481,6 +483,8 @@ response itself is simply the stringified version of the received value,
481483
Here is the code for the parent task:
482484

483485
~~~
486+
#![allow(deprecated)]
487+
484488
use std::comm::duplex;
485489
# use std::task::spawn;
486490
# use std::comm::DuplexStream;

0 commit comments

Comments
 (0)