Skip to content

Commit c14dd26

Browse files
committed
---
yaml --- r: 212835 b: refs/heads/master c: c6b1483 h: refs/heads/master i: 212833: ebb139a 212831: ebba880 v: v3
1 parent ab258bc commit c14dd26

File tree

309 files changed

+5682
-3220
lines changed

Some content is hidden

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

309 files changed

+5682
-3220
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9d6ffbdaa8526595f5f18f0f3023d76193ce3267
2+
refs/heads/master: c6b14833771d0254d189b368b5ab41b295e02fd1
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
55
refs/heads/try: 1864973ae17213c5a58c4dd3f9af6d1b6c7d2e05

trunk/.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ before_script:
1616
script:
1717
- make tidy
1818

19+
# Real testing happens on http://buildbot.rust-lang.org/
20+
#
21+
# See https://github.com/rust-lang/rust-buildbot
22+
# CONTRIBUTING.md#pull-requests
23+
1924
notifications:
2025
email: false
2126

trunk/RELEASES.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
Version 1.1.0 (July 2015)
2+
========================
3+
4+
* NNNN changes, numerous bugfixes
5+
6+
Libraries
7+
---------
8+
9+
* The [`std::fs` module has been expanded][fs-expand] to expand the set of
10+
functionality exposed:
11+
* `DirEntry` now supports optimizations like `file_type` and `metadata` which
12+
don't incur a syscall on some platforms.
13+
* A `symlink_metadata` function has been added.
14+
* The `fs::Metadata` structure now lowers to its OS counterpart, providing
15+
access to all underlying information.
16+
17+
[fs-expand]: https://github.com/rust-lang/rust/pull/25844
18+
119
Version 1.0.0 (May 2015)
220
========================
321

trunk/mk/cfg/x86_64-pc-windows-msvc.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ CPP_x86_64-pc-windows-msvc="$(CFG_MSVC_CL)" -nologo
66
AR_x86_64-pc-windows-msvc="$(CFG_MSVC_LIB)" -nologo
77
CFG_LIB_NAME_x86_64-pc-windows-msvc=$(1).dll
88
CFG_STATIC_LIB_NAME_x86_64-pc-windows-msvc=$(1).lib
9-
CFG_LIB_GLOB_x86_64-pc-windows-msvc=$(1)-*.dll
9+
CFG_LIB_GLOB_x86_64-pc-windows-msvc=$(1)-*.{dll,lib}
1010
CFG_LIB_DSYM_GLOB_x86_64-pc-windows-msvc=$(1)-*.dylib.dSYM
1111
CFG_JEMALLOC_CFLAGS_x86_64-pc-windows-msvc :=
12-
CFG_GCCISH_CFLAGS_x86_64-pc-windows-msvc :=
13-
CFG_GCCISH_CXXFLAGS_x86_64-pc-windows-msvc :=
12+
CFG_GCCISH_CFLAGS_x86_64-pc-windows-msvc := -MD
13+
CFG_GCCISH_CXXFLAGS_x86_64-pc-windows-msvc := -MD
1414
CFG_GCCISH_LINK_FLAGS_x86_64-pc-windows-msvc :=
1515
CFG_GCCISH_DEF_FLAG_x86_64-pc-windows-msvc :=
1616
CFG_LLC_FLAGS_x86_64-pc-windows-msvc :=

trunk/mk/docs.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ DOC_TARGETS += doc/not_found.html
169169
doc/not_found.html: $(D)/not_found.md $(HTML_DEPS) | doc/
170170
@$(call E, rustdoc: $@)
171171
$(Q)$(RUSTDOC) $(RUSTDOC_HTML_OPTS_NO_CSS) \
172+
--markdown-no-toc \
172173
--markdown-css http://doc.rust-lang.org/rust.css $<
173174

174175
define DEF_DOC

trunk/mk/prepare.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ define PREPARE_LIB
6363
echo " at destination $(PREPARE_WORKING_DEST_LIB_DIR):" && \
6464
echo $$MATCHES ; \
6565
fi
66-
$(Q)$(PREPARE_LIB_CMD) `ls -drt1 $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1) | tail -1` $(PREPARE_WORKING_DEST_LIB_DIR)/
66+
$(Q)$(PREPARE_LIB_CMD) `ls -drt1 $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1)` $(PREPARE_WORKING_DEST_LIB_DIR)/
6767
endef
6868

6969
# Copy a man page

trunk/src/compiletest/runtest.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
285285
format!("--target={}", config.target),
286286
"-L".to_string(),
287287
aux_dir.to_str().unwrap().to_string());
288-
args.extend(split_maybe_args(&config.target_rustcflags).into_iter());
289-
args.extend(split_maybe_args(&props.compile_flags).into_iter());
288+
args.extend(split_maybe_args(&config.target_rustcflags));
289+
args.extend(split_maybe_args(&props.compile_flags));
290290
return ProcArgs {
291291
prog: config.rustc_path.to_str().unwrap().to_string(),
292292
args: args,
@@ -333,8 +333,8 @@ actual:\n\
333333
config.build_base.to_str().unwrap().to_string(),
334334
"-L".to_string(),
335335
aux_dir.to_str().unwrap().to_string());
336-
args.extend(split_maybe_args(&config.target_rustcflags).into_iter());
337-
args.extend(split_maybe_args(&props.compile_flags).into_iter());
336+
args.extend(split_maybe_args(&config.target_rustcflags));
337+
args.extend(split_maybe_args(&props.compile_flags));
338338
// FIXME (#9639): This needs to handle non-utf8 paths
339339
return ProcArgs {
340340
prog: config.rustc_path.to_str().unwrap().to_string(),
@@ -380,7 +380,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
380380
script_str.push_str(&format!("set solib-search-path \
381381
./{}/stage2/lib/rustlib/{}/lib/\n",
382382
config.host, config.target));
383-
for line in breakpoint_lines.iter() {
383+
for line in &breakpoint_lines {
384384
script_str.push_str(&format!("break {:?}:{}\n",
385385
testfile.file_name().unwrap()
386386
.to_string_lossy(),
@@ -1171,7 +1171,7 @@ fn document(config: &Config, props: &TestProps,
11711171
out_dir.to_str().unwrap().to_string(),
11721172
testfile.to_str().unwrap().to_string()];
11731173
args.extend(extra_args.iter().cloned());
1174-
args.extend(split_maybe_args(&props.compile_flags).into_iter());
1174+
args.extend(split_maybe_args(&props.compile_flags));
11751175
let args = ProcArgs {
11761176
prog: config.rustdoc_path.to_str().unwrap().to_string(),
11771177
args: args,
@@ -1236,7 +1236,7 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
12361236
vec!("--crate-type=dylib".to_string())
12371237
}
12381238
};
1239-
crate_type.extend(extra_link_args.clone().into_iter());
1239+
crate_type.extend(extra_link_args.clone());
12401240
let aux_args =
12411241
make_compile_args(config,
12421242
&aux_props,
@@ -1334,11 +1334,11 @@ fn make_compile_args<F>(config: &Config,
13341334
};
13351335
args.push(path.to_str().unwrap().to_string());
13361336
if props.force_host {
1337-
args.extend(split_maybe_args(&config.host_rustcflags).into_iter());
1337+
args.extend(split_maybe_args(&config.host_rustcflags));
13381338
} else {
1339-
args.extend(split_maybe_args(&config.target_rustcflags).into_iter());
1339+
args.extend(split_maybe_args(&config.target_rustcflags));
13401340
}
1341-
args.extend(split_maybe_args(&props.compile_flags).into_iter());
1341+
args.extend(split_maybe_args(&props.compile_flags));
13421342
return ProcArgs {
13431343
prog: config.rustc_path.to_str().unwrap().to_string(),
13441344
args: args,
@@ -1373,7 +1373,7 @@ fn make_run_args(config: &Config, props: &TestProps, testfile: &Path)
13731373
args.push(exe_file.to_str().unwrap().to_string());
13741374

13751375
// Add the arguments in the run_flags directive
1376-
args.extend(split_maybe_args(&props.run_flags).into_iter());
1376+
args.extend(split_maybe_args(&props.run_flags));
13771377

13781378
let prog = args.remove(0);
13791379
return ProcArgs {
@@ -1683,7 +1683,7 @@ fn compile_test_and_save_ir(config: &Config, props: &TestProps,
16831683
aux_dir.to_str().unwrap().to_string());
16841684
let llvm_args = vec!("--emit=llvm-ir".to_string(),
16851685
"--crate-type=lib".to_string());
1686-
link_args.extend(llvm_args.into_iter());
1686+
link_args.extend(llvm_args);
16871687
let args = make_compile_args(config,
16881688
props,
16891689
link_args,

trunk/src/doc/complement-lang-faq.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,14 @@ You may also be interested in browsing [trending Rust repositories][github-rust]
3030

3131
## Is anyone using Rust in production?
3232

33-
Currently, Rust is still pre-1.0, and so we don't recommend that you use Rust
34-
in production unless you know exactly what you're getting into.
35-
36-
That said, there are two production deployments of Rust that we're aware of:
33+
Yes. For example (incomplete):
3734

3835
* [OpenDNS](http://labs.opendns.com/2013/10/04/zeromq-helping-us-block-malicious-domains/)
3936
* [Skylight](http://skylight.io)
40-
41-
Let the fact that this is an easily countable number be a warning.
37+
* [wit.ai](https://github.com/wit-ai/witd)
38+
* [Codius](https://codius.org/blog/codius-rust/)
39+
* [MaidSafe](http://maidsafe.net/)
40+
* [Terminal.com](https://terminal.com)
4241

4342
## Does it run on Windows?
4443

trunk/src/doc/grammar.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ type_path_tail : '<' type_expr [ ',' type_expr ] + '>'
281281
## Macros
282282

283283
```antlr
284-
expr_macro_rules : "macro_rules" '!' ident '(' macro_rule * ')' ;
284+
expr_macro_rules : "macro_rules" '!' ident '(' macro_rule * ')' ';'
285+
| "macro_rules" '!' ident '{' macro_rule * '}' ;
285286
macro_rule : '(' matcher * ')' "=>" '(' transcriber * ')' ';' ;
286287
matcher : '(' matcher * ')' | '[' matcher * ']'
287288
| '{' matcher * '}' | '$' ident ':' ident

trunk/src/doc/not_found.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ Looks like you've taken a wrong turn.
1111

1212
Some things that might be helpful to you though:
1313

14-
## Search
14+
# Search
1515

1616
* <form action="https://duckduckgo.com/">
1717
<input type="text" id="site-search" name="q" size="80"></input>
1818
<input type="submit" value="Search DuckDuckGo">
1919
</form>
2020
* Rust doc search: <span id="core-search"></span>
2121

22-
## Reference
22+
# Reference
2323

2424
* [The Rust official site](http://rust-lang.org)
2525
* [The Rust reference](http://doc.rust-lang.org/reference.html)
2626

27-
## Docs
27+
# Docs
2828

2929
* [The standard library](http://doc.rust-lang.org/std/)
3030

trunk/src/doc/reference.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ extern fn new_i32() -> i32 { 0 }
11111111
extern "stdcall" fn new_i32_stdcall() -> i32 { 0 }
11121112
```
11131113

1114-
Unlike normal functions, extern fns have an `extern "ABI" fn()`. This is the
1114+
Unlike normal functions, extern fns have type `extern "ABI" fn()`. This is the
11151115
same type as the functions declared in an extern block.
11161116

11171117
```
@@ -1367,7 +1367,6 @@ Traits can include default implementations of methods, as in:
13671367
```
13681368
trait Foo {
13691369
fn bar(&self);
1370-
13711370
fn baz(&self) { println!("We called baz."); }
13721371
}
13731372
```
@@ -1551,7 +1550,7 @@ methods in such an implementation can only be used as direct calls on the
15511550
values of the type that the implementation targets. In such an implementation,
15521551
the trait type and `for` after `impl` are omitted. Such implementations are
15531552
limited to nominal types (enums, structs), and the implementation must appear
1554-
in the same module or a sub-module as the `self` type:
1553+
in the same crate as the `self` type:
15551554

15561555
```
15571556
struct Point {x: i32, y: i32}

trunk/src/doc/trpl/closures.md

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -324,37 +324,34 @@ first, it may seem strange, but we’ll figure it out. Here’s how you’d prob
324324
try to return a closure from a function:
325325

326326
```rust,ignore
327-
fn factory() -> (Fn(i32) -> Vec<i32>) {
328-
let vec = vec![1, 2, 3];
327+
fn factory() -> (Fn(i32) -> i32) {
328+
let num = 5;
329329
330-
|n| vec.push(n)
330+
|x| x + num
331331
}
332332
333333
let f = factory();
334334
335-
let answer = f(4);
336-
assert_eq!(vec![1, 2, 3, 4], answer);
335+
let answer = f(1);
336+
assert_eq!(6, answer);
337337
```
338338

339339
This gives us these long, related errors:
340340

341341
```text
342342
error: the trait `core::marker::Sized` is not implemented for the type
343-
`core::ops::Fn(i32) -> collections::vec::Vec<i32>` [E0277]
344-
f = factory();
345-
^
346-
note: `core::ops::Fn(i32) -> collections::vec::Vec<i32>` does not have a
347-
constant size known at compile-time
348-
f = factory();
349-
^
350-
error: the trait `core::marker::Sized` is not implemented for the type
351-
`core::ops::Fn(i32) -> collections::vec::Vec<i32>` [E0277]
352-
factory() -> (Fn(i32) -> Vec<i32>) {
353-
^~~~~~~~~~~~~~~~~~~~~
354-
note: `core::ops::Fn(i32) -> collections::vec::Vec<i32>` does not have a constant size known at compile-time
355-
factory() -> (Fn(i32) -> Vec<i32>) {
356-
^~~~~~~~~~~~~~~~~~~~~
357-
343+
`core::ops::Fn(i32) -> i32` [E0277]
344+
fn factory() -> (Fn(i32) -> i32) {
345+
^~~~~~~~~~~~~~~~
346+
note: `core::ops::Fn(i32) -> i32` does not have a constant size known at compile-time
347+
fn factory() -> (Fn(i32) -> i32) {
348+
^~~~~~~~~~~~~~~~
349+
error: the trait `core::marker::Sized` is not implemented for the type `core::ops::Fn(i32) -> i32` [E0277]
350+
let f = factory();
351+
^
352+
note: `core::ops::Fn(i32) -> i32` does not have a constant size known at compile-time
353+
let f = factory();
354+
^
358355
```
359356

360357
In order to return something from a function, Rust needs to know what
@@ -364,16 +361,16 @@ way to give something a size is to take a reference to it, as references
364361
have a known size. So we’d write this:
365362

366363
```rust,ignore
367-
fn factory() -> &(Fn(i32) -> Vec<i32>) {
368-
let vec = vec![1, 2, 3];
364+
fn factory() -> &(Fn(i32) -> i32) {
365+
let num = 5;
369366
370-
|n| vec.push(n)
367+
|x| x + num
371368
}
372369
373370
let f = factory();
374371
375-
let answer = f(4);
376-
assert_eq!(vec![1, 2, 3, 4], answer);
372+
let answer = f(1);
373+
assert_eq!(6, answer);
377374
```
378375

379376
But we get another error:
@@ -448,7 +445,8 @@ assert_eq!(6, answer);
448445
We use a trait object, by `Box`ing up the `Fn`. There’s just one last problem:
449446

450447
```text
451-
error: `num` does not live long enough
448+
error: closure may outlive the current function, but it borrows `num`,
449+
which is owned by the current function [E0373]
452450
Box::new(|x| x + num)
453451
^~~~~~~~~~~
454452
```

trunk/src/doc/trpl/const-and-static.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ unsafe {
6464

6565
[unsafe]: unsafe.html
6666

67-
Furthermore, any type stored in a `static` must be `Sync`.
67+
Furthermore, any type stored in a `static` must be `Sync`, and may not have
68+
a [`Drop`][drop] implementation.
69+
70+
[drop]: drop.html
6871

6972
# Initializing
7073

@@ -78,7 +81,3 @@ Almost always, if you can choose between the two, choose `const`. It’s pretty
7881
rare that you actually want a memory location associated with your constant,
7982
and using a const allows for optimizations like constant propagation not only
8083
in your crate but downstream crates.
81-
82-
A const can be thought of as a `#define` in C: it has metadata overhead but it
83-
has no runtime overhead. “Should I use a #define or a static in C,” is largely
84-
the same question as whether you should use a const or a static in Rust.

trunk/src/doc/trpl/dining-philosophers.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -674,9 +674,13 @@ let handles: Vec<_> = philosophers.into_iter().map(|p| {
674674

675675
Finally, inside of our `map()`/`collect()` loop, we call `table.clone()`. The
676676
`clone()` method on `Arc<T>` is what bumps up the reference count, and when it
677-
goes out of scope, it decrements the count. You’ll notice we can introduce a
678-
new binding to `table` here, and it will shadow the old one. This is often used
679-
so that you don’t need to come up with two unique names.
677+
goes out of scope, it decrements the count. This is needed so that we know how
678+
many references to `table` exist across our threads. If we didn’t have a count,
679+
we wouldn’t know how to deallocate it.
680+
681+
You’ll notice we can introduce a new binding to `table` here, and it will
682+
shadow the old one. This is often used so that you don’t need to come up with
683+
two unique names.
680684

681685
With this, our program works! Only two philosophers can eat at any one time,
682686
and so you’ll get some output like this:

0 commit comments

Comments
 (0)