Skip to content

Commit ab258bc

Browse files
committed
---
yaml --- r: 212834 b: refs/heads/master c: 9d6ffbd h: refs/heads/master v: v3
1 parent ebb139a commit ab258bc

File tree

311 files changed

+3220
-5701
lines changed

Some content is hidden

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

311 files changed

+3220
-5701
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: 50ab23ddbd39d797dde46288af0ae9d29784e7a3
2+
refs/heads/master: 9d6ffbdaa8526595f5f18f0f3023d76193ce3267
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
55
refs/heads/try: 1864973ae17213c5a58c4dd3f9af6d1b6c7d2e05

trunk/.travis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ 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-
2419
notifications:
2520
email: false
2621

trunk/RELEASES.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
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-
191
Version 1.0.0 (May 2015)
202
========================
213

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,lib}
9+
CFG_LIB_GLOB_x86_64-pc-windows-msvc=$(1)-*.dll
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 := -MD
13-
CFG_GCCISH_CXXFLAGS_x86_64-pc-windows-msvc := -MD
12+
CFG_GCCISH_CFLAGS_x86_64-pc-windows-msvc :=
13+
CFG_GCCISH_CXXFLAGS_x86_64-pc-windows-msvc :=
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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ 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 \
173172
--markdown-css http://doc.rust-lang.org/rust.css $<
174173

175174
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)` $(PREPARE_WORKING_DEST_LIB_DIR)/
66+
$(Q)$(PREPARE_LIB_CMD) `ls -drt1 $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1) | tail -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));
289-
args.extend(split_maybe_args(&props.compile_flags));
288+
args.extend(split_maybe_args(&config.target_rustcflags).into_iter());
289+
args.extend(split_maybe_args(&props.compile_flags).into_iter());
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));
337-
args.extend(split_maybe_args(&props.compile_flags));
336+
args.extend(split_maybe_args(&config.target_rustcflags).into_iter());
337+
args.extend(split_maybe_args(&props.compile_flags).into_iter());
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 {
383+
for line in breakpoint_lines.iter() {
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));
1174+
args.extend(split_maybe_args(&props.compile_flags).into_iter());
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());
1239+
crate_type.extend(extra_link_args.clone().into_iter());
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));
1337+
args.extend(split_maybe_args(&config.host_rustcflags).into_iter());
13381338
} else {
1339-
args.extend(split_maybe_args(&config.target_rustcflags));
1339+
args.extend(split_maybe_args(&config.target_rustcflags).into_iter());
13401340
}
1341-
args.extend(split_maybe_args(&props.compile_flags));
1341+
args.extend(split_maybe_args(&props.compile_flags).into_iter());
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));
1376+
args.extend(split_maybe_args(&props.run_flags).into_iter());
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);
1686+
link_args.extend(llvm_args.into_iter());
16871687
let args = make_compile_args(config,
16881688
props,
16891689
link_args,

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

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

3131
## Is anyone using Rust in production?
3232

33-
Yes. For example (incomplete):
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:
3437

3538
* [OpenDNS](http://labs.opendns.com/2013/10/04/zeromq-helping-us-block-malicious-domains/)
3639
* [Skylight](http://skylight.io)
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)
40+
41+
Let the fact that this is an easily countable number be a warning.
4142

4243
## Does it run on Windows?
4344

trunk/src/doc/grammar.md

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

283283
```antlr
284-
expr_macro_rules : "macro_rules" '!' ident '(' macro_rule * ')' ';'
285-
| "macro_rules" '!' ident '{' macro_rule * '}' ;
284+
expr_macro_rules : "macro_rules" '!' ident '(' macro_rule * ')' ;
286285
macro_rule : '(' matcher * ')' "=>" '(' transcriber * ')' ';' ;
287286
matcher : '(' matcher * ')' | '[' matcher * ']'
288287
| '{' 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: 3 additions & 2 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 type `extern "ABI" fn()`. This is the
1114+
Unlike normal functions, extern fns have an `extern "ABI" fn()`. This is the
11151115
same type as the functions declared in an extern block.
11161116

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

15551556
```
15561557
struct Point {x: i32, y: i32}

trunk/src/doc/trpl/closures.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -324,34 +324,37 @@ 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) -> i32) {
328-
let num = 5;
327+
fn factory() -> (Fn(i32) -> Vec<i32>) {
328+
let vec = vec![1, 2, 3];
329329
330-
|x| x + num
330+
|n| vec.push(n)
331331
}
332332
333333
let f = factory();
334334
335-
let answer = f(1);
336-
assert_eq!(6, answer);
335+
let answer = f(4);
336+
assert_eq!(vec![1, 2, 3, 4], 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) -> 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-
^
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+
355358
```
356359

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

363366
```rust,ignore
364-
fn factory() -> &(Fn(i32) -> i32) {
365-
let num = 5;
367+
fn factory() -> &(Fn(i32) -> Vec<i32>) {
368+
let vec = vec![1, 2, 3];
366369
367-
|x| x + num
370+
|n| vec.push(n)
368371
}
369372
370373
let f = factory();
371374
372-
let answer = f(1);
373-
assert_eq!(6, answer);
375+
let answer = f(4);
376+
assert_eq!(vec![1, 2, 3, 4], answer);
374377
```
375378

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

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

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

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

6565
[unsafe]: unsafe.html
6666

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
67+
Furthermore, any type stored in a `static` must be `Sync`.
7168

7269
# Initializing
7370

@@ -81,3 +78,7 @@ Almost always, if you can choose between the two, choose `const`. It’s pretty
8178
rare that you actually want a memory location associated with your constant,
8279
and using a const allows for optimizations like constant propagation not only
8380
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: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -674,13 +674,9 @@ 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. 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.
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.
684680

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

0 commit comments

Comments
 (0)