Skip to content

Commit 32e2cfe

Browse files
author
Ulrik Sverdrup
committed
---
yaml --- r: 211951 b: refs/heads/auto c: a090e1f h: refs/heads/master i: 211949: 216a8ac 211947: 5b8c4e6 211943: a178591 211935: 0fc8f4d v: v3
1 parent b32f52f commit 32e2cfe

File tree

23 files changed

+156
-402
lines changed

23 files changed

+156
-402
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: bfd072db45d07a7c0ed2248737ef3c61131729fc
13+
refs/heads/auto: a090e1f411b65236b5ca8aad3e9375426fcd075e
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/configure

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,12 +1307,6 @@ CFG_LLVM_SRC_DIR=${CFG_SRC_DIR}src/llvm/
13071307
for t in $CFG_HOST
13081308
do
13091309
do_reconfigure=1
1310-
is_msvc=0
1311-
case "$t" in
1312-
(*-msvc)
1313-
is_msvc=1
1314-
;;
1315-
esac
13161310

13171311
if [ -z $CFG_LLVM_ROOT ]
13181312
then
@@ -1332,13 +1326,7 @@ do
13321326
LLVM_ASSERTION_OPTS="--disable-assertions"
13331327
else
13341328
LLVM_ASSERTION_OPTS="--enable-assertions"
1335-
1336-
# Apparently even if we request assertions be enabled for MSVC,
1337-
# LLVM's CMake build system ignore this and outputs in `Release`
1338-
# anyway.
1339-
if [ ${is_msvc} -eq 0 ]; then
1340-
LLVM_INST_DIR=${LLVM_INST_DIR}+Asserts
1341-
fi
1329+
LLVM_INST_DIR=${LLVM_INST_DIR}+Asserts
13421330
fi
13431331
else
13441332
msg "not reconfiguring LLVM, external LLVM root"
@@ -1368,7 +1356,14 @@ do
13681356
done
13691357
fi
13701358

1371-
if [ ${do_reconfigure} -ne 0 ] && [ ${is_msvc} -ne 0 ]
1359+
use_cmake=0
1360+
case "$t" in
1361+
(*-msvc)
1362+
use_cmake=1
1363+
;;
1364+
esac
1365+
1366+
if [ ${do_reconfigure} -ne 0 ] && [ ${use_cmake} -ne 0 ]
13721367
then
13731368
msg "configuring LLVM for $t with cmake"
13741369

@@ -1393,7 +1388,7 @@ do
13931388
need_ok "LLVM cmake configure failed"
13941389
fi
13951390

1396-
if [ ${do_reconfigure} -ne 0 ] && [ ${is_msvc} -eq 0 ]
1391+
if [ ${do_reconfigure} -ne 0 ] && [ ${use_cmake} -eq 0 ]
13971392
then
13981393
# LLVM's configure doesn't recognize the new Windows triples yet
13991394
gnu_t=$(to_gnu_triple $t)

branches/auto/src/doc/index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ series of small examples.
2525
If you need help with something, or just want to talk about Rust with others,
2626
there are a few places you can do that:
2727

28-
The Rust IRC channels on [irc.mozilla.org](irc://irc.mozilla.org/) are the
28+
The Rust IRC channels on [irc.mozilla.org](http://irc.mozilla.org/) are the
2929
fastest way to get help.
3030
[`#rust`](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust) is
3131
the general discussion channel, and you'll find people willing to help you with
@@ -40,15 +40,15 @@ There's also
4040
[`#rust-internals`](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals), which is for discussion of the development of Rust itself.
4141

4242
You can also get help on [Stack
43-
Overflow](https://stackoverflow.com/questions/tagged/rust). Searching for your
43+
Overflow](http://stackoverflow.com/questions/tagged/rust). Searching for your
4444
problem might reveal someone who has asked it before!
4545

46-
There is an active [subreddit](https://reddit.com/r/rust) with lots of
46+
There is an active [subreddit](http://reddit.com/r/rust) with lots of
4747
discussion and news about Rust.
4848

49-
There is also a [user forum](https://users.rust-lang.org), for all
50-
user-oriented discussion, and a [developer
51-
forum](https://internals.rust-lang.org/), where the development of Rust
49+
There is also a [user forum](http://users.rust-lang.org), for all
50+
user-oriented discussion, and a [developer
51+
forum](http://internals.rust-lang.org/), where the development of Rust
5252
itself is discussed.
5353

5454
# Specification
@@ -61,7 +61,7 @@ the language in as much detail as possible is in [the reference](reference.html)
6161
Rust is still a young language, so there isn't a ton of tooling yet, but the
6262
tools we have are really nice.
6363

64-
[Cargo](https://crates.io) is Rust's package manager, and its website contains
64+
[Cargo](http://crates.io) is Rust's package manager, and its website contains
6565
lots of good documentation.
6666

6767
[`rustdoc`](book/documentation.html) is used to generate documentation for Rust code.

branches/auto/src/doc/trpl/for-loops.md

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -41,45 +41,3 @@ so our loop will print `0` through `9`, not `10`.
4141
Rust does not have the “C-style” `for` loop on purpose. Manually controlling
4242
each element of the loop is complicated and error prone, even for experienced C
4343
developers.
44-
45-
# Enumerate
46-
47-
When you need to keep track of how many times you already looped, you can use the `.enumerate()` function.
48-
49-
## On ranges:
50-
51-
```rust
52-
for (i,j) in (5..10).enumerate() {
53-
println!("i = {} and j = {}", i, j);
54-
}
55-
```
56-
57-
Outputs:
58-
59-
```text
60-
i = 0 and j = 5
61-
i = 1 and j = 6
62-
i = 2 and j = 7
63-
i = 3 and j = 8
64-
i = 4 and j = 9
65-
```
66-
67-
Don't forget to add the parentheses around the range.
68-
69-
## On iterators:
70-
71-
```rust
72-
# let lines = "hello\nworld".lines();
73-
for (linenumber, line) in lines.enumerate() {
74-
println!("{}: {}", linenumber, line);
75-
}
76-
```
77-
78-
Outputs:
79-
80-
```text
81-
0: Content of line one
82-
1: Content of line two
83-
2: Content of line tree
84-
3: Content of line four
85-
```

branches/auto/src/doc/trpl/hello-cargo.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ $ mv main.rs src/main.rs
3333
```
3434

3535
Note that since we're creating an executable, we used `main.rs`. If we
36-
want to make a library instead, we should use `lib.rs`. This convention is required
37-
for Cargo to successfully compile our projects, but it can be overridden if we wish.
36+
want to make a library instead, we should use `lib.rs`.
3837
Custom file locations for the entry point can be specified
3938
with a [`[[lib]]` or `[[bin]]`][crates-custom] key in the TOML file described below.
4039

@@ -63,17 +62,18 @@ version = "0.0.1"
6362
authors = [ "Your name <[email protected]>" ]
6463
```
6564

66-
This file is in the [TOML][toml] format. TOML is similar to INI, but has some
67-
extra goodies. According to the TOML docs,
65+
This file is in the [TOML][toml] format. Let’s let it explain itself to you:
6866

6967
> TOML aims to be a minimal configuration file format that's easy to read due
7068
> to obvious semantics. TOML is designed to map unambiguously to a hash table.
7169
> TOML should be easy to parse into data structures in a wide variety of
7270
> languages.
7371
72+
TOML is very similar to INI, but with some extra goodies.
73+
7474
[toml]: https://github.com/toml-lang/toml
7575

76-
Once you have this file in place, we should be ready to build! To do so, run:
76+
Once you have this file in place, we should be ready to build! Try this:
7777

7878
```bash
7979
$ cargo build
@@ -82,7 +82,7 @@ $ ./target/debug/hello_world
8282
Hello, world!
8383
```
8484

85-
Bam! We built our project with `cargo build`, and ran it with
85+
Bam! We build our project with `cargo build`, and run it with
8686
`./target/debug/hello_world`. We can do both in one step with `cargo run`:
8787

8888
```bash
@@ -103,9 +103,9 @@ Hello, world!
103103
```
104104

105105
This hasn’t bought us a whole lot over our simple use of `rustc`, but think
106-
about the future: when our project gets more complex, we need to do more
106+
about the future: when our project gets more complex, we would need to do more
107107
things to get all of the parts to properly compile. With Cargo, as our project
108-
grows, we can just run `cargo build`, and it’ll work the right way.
108+
grows, we can just `cargo build`, and it’ll work the right way.
109109

110110
When your project is finally ready for release, you can use
111111
`cargo build --release` to compile your project with optimizations.
@@ -118,7 +118,7 @@ name = "hello_world"
118118
version = "0.0.1"
119119
```
120120

121-
The `Cargo.lock` file is used by Cargo to keep track of dependencies in your application.
121+
This file is used by Cargo to keep track of dependencies in your application.
122122
Right now, we don’t have any, so it’s a bit sparse. You won't ever need
123123
to touch this file yourself, just let Cargo handle it.
124124

branches/auto/src/doc/trpl/macros.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ more" match. Both forms optionally include a separator, which can be any token
224224
except `+` or `*`.
225225

226226
This system is based on
227-
"[Macro-by-Example](https://www.cs.indiana.edu/ftp/techreports/TR206.pdf)"
227+
"[Macro-by-Example](http://www.cs.indiana.edu/ftp/techreports/TR206.pdf)"
228228
(PDF link).
229229

230230
# Hygiene
@@ -319,7 +319,7 @@ syntax context where it was introduced. It’s as though the variable `state`
319319
inside `main` is painted a different "color" from the variable `state` inside
320320
the macro, and therefore they don’t conflict.
321321

322-
[hygienic macro system]: https://en.wikipedia.org/wiki/Hygienic_macro
322+
[hygienic macro system]: http://en.wikipedia.org/wiki/Hygienic_macro
323323

324324
This also restricts the ability of macros to introduce new bindings at the
325325
invocation site. Code such as the following will not work:
@@ -622,7 +622,7 @@ invocation gives you another opportunity to pattern-match the macro’s
622622
arguments.
623623

624624
As an extreme example, it is possible, though hardly advisable, to implement
625-
the [Bitwise Cyclic Tag](https://esolangs.org/wiki/Bitwise_Cyclic_Tag) automaton
625+
the [Bitwise Cyclic Tag](http://esolangs.org/wiki/Bitwise_Cyclic_Tag) automaton
626626
within Rust’s macro system.
627627

628628
```rust

branches/auto/src/doc/trpl/references-and-borrowing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ First, any borrow must last for a smaller scope than the owner. Second, you may
155155
have one or the other of these two kinds of borrows, but not both at the same
156156
time:
157157

158-
* one or more references (`&T`) to a resource.
158+
* 0 to N references (`&T`) to a resource.
159159
* exactly one mutable reference (`&mut T`)
160160

161161

branches/auto/src/liballoc/arc.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,6 @@ impl<T: ?Sized> Deref for Arc<T> {
332332
}
333333
}
334334

335-
#[stable(feature = "rc_arc_as_ref", since = "1.2.0")]
336-
impl<T: ?Sized> AsRef<T> for Arc<T> {
337-
338-
#[inline]
339-
fn as_ref(&self) -> &T {
340-
&self.inner().data
341-
}
342-
}
343-
344335
impl<T: Clone> Arc<T> {
345336
/// Make a mutable reference from the given `Arc<T>`.
346337
///

branches/auto/src/liballoc/rc.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ use std::boxed;
156156
use core::cell::Cell;
157157
use core::clone::Clone;
158158
use core::cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering};
159-
use core::convert::AsRef;
160159
use core::default::Default;
161160
use core::fmt;
162161
use core::hash::{Hasher, Hash};
@@ -380,15 +379,6 @@ impl<T: ?Sized> Deref for Rc<T> {
380379
}
381380
}
382381

383-
#[stable(feature = "rc_arc_as_ref", since = "1.2.0")]
384-
impl<T: ?Sized> AsRef<T> for Rc<T> {
385-
386-
#[inline(always)]
387-
fn as_ref(&self) -> &T {
388-
&self.inner().value
389-
}
390-
}
391-
392382
#[stable(feature = "rust1", since = "1.0.0")]
393383
impl<T: ?Sized> Drop for Rc<T> {
394384
/// Drops the `Rc<T>`.

branches/auto/src/libcollections/linked_list.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -626,21 +626,13 @@ impl<T> LinkedList<T> {
626626
#[stable(feature = "rust1", since = "1.0.0")]
627627
impl<T> Drop for LinkedList<T> {
628628
fn drop(&mut self) {
629-
// Dissolve the linked_list in backwards direction
629+
// Dissolve the linked_list in a loop.
630630
// Just dropping the list_head can lead to stack exhaustion
631631
// when length is >> 1_000_000
632-
let mut tail = self.list_tail;
633-
loop {
634-
match tail.resolve() {
635-
None => break,
636-
Some(prev) => {
637-
prev.next.take(); // release Box<Node<T>>
638-
tail = prev.prev;
639-
}
640-
}
632+
while let Some(mut head_) = self.list_head.take() {
633+
self.list_head = head_.next.take();
641634
}
642635
self.length = 0;
643-
self.list_head = None;
644636
self.list_tail = Rawlink::none();
645637
}
646638
}

branches/auto/src/libcollections/str.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,6 @@ impl str {
14661466
/// assert_eq!("bors".as_bytes(), b"bors");
14671467
/// ```
14681468
#[stable(feature = "rust1", since = "1.0.0")]
1469-
#[inline(always)]
14701469
pub fn as_bytes(&self) -> &[u8] {
14711470
core_str::StrExt::as_bytes(&self[..])
14721471
}

branches/auto/src/libcore/cell.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
//!
3939
//! * Introducing inherited mutability roots to shared types.
4040
//! * Implementation details of logically-immutable methods.
41-
//! * Mutating implementations of `Clone`.
41+
//! * Mutating implementations of `clone`.
4242
//!
4343
//! ## Introducing inherited mutability roots to shared types
4444
//!
@@ -109,7 +109,7 @@
109109
//! }
110110
//! ```
111111
//!
112-
//! ## Mutating implementations of `Clone`
112+
//! ## Mutating implementations of `clone`
113113
//!
114114
//! This is simply a special - but common - case of the previous: hiding mutability for operations
115115
//! that appear to be immutable. The `clone` method is expected to not change the source value, and

branches/auto/src/librustc/middle/check_rvalues.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl<'a, 'tcx> euv::Delegate<'tcx> for RvalueContextDelegate<'a, 'tcx> {
6060
cmt: mc::cmt<'tcx>,
6161
_: euv::ConsumeMode) {
6262
debug!("consume; cmt: {:?}; type: {}", *cmt, ty_to_string(self.tcx, cmt.ty));
63-
if !ty::type_is_sized(Some(self.param_env), self.tcx, span, cmt.ty) {
63+
if !ty::type_is_sized(self.param_env, span, cmt.ty) {
6464
span_err!(self.tcx.sess, span, E0161,
6565
"cannot move a value of type {0}: the size of {0} cannot be statically determined",
6666
ty_to_string(self.tcx, cmt.ty));

branches/auto/src/librustc/middle/intrinsicck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ impl<'a, 'tcx> IntrinsicCheckingVisitor<'a, 'tcx> {
212212
debug!("with_each_combination: space={:?}, index={}, param_ty={}",
213213
space, index, param_ty.repr(self.tcx));
214214

215-
if !ty::type_is_sized(Some(param_env), self.tcx, span, param_ty) {
215+
if !ty::type_is_sized(param_env, span, param_ty) {
216216
debug!("with_each_combination: param_ty is not known to be sized");
217217

218218
substs.types.get_mut_slice(space)[index] = self.dummy_unsized_ty;

0 commit comments

Comments
 (0)