Skip to content

Commit 8bf667f

Browse files
committed
---
yaml --- r: 188134 b: refs/heads/try c: 708c385 h: refs/heads/master v: v3
1 parent bb3117a commit 8bf667f

File tree

164 files changed

+2999
-4633
lines changed

Some content is hidden

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

164 files changed

+2999
-4633
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 38e97b99a6b133cb4c621c68e75b28abc6c617c1
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
5-
refs/heads/try: 644b931437402d9e27606923bda4f63b7365d516
5+
refs/heads/try: 708c3858e3e98d1b362b73510aa48416c3f68e51
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ then
875875
| cut -d ' ' -f 2)
876876

877877
case $CFG_CLANG_VERSION in
878-
(3.2* | 3.3* | 3.4* | 3.5* | 3.6*)
878+
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 3.4* | 3.5* | 3.6*)
879879
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
880880
if [ -z "$CC" ]
881881
then

branches/try/mk/crates.mk

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ TARGET_CRATES := libc std flate arena term \
5454
log graphviz core rbml alloc \
5555
unicode rustc_bitflags
5656
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
57-
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint
57+
rustc_trans rustc_back rustc_llvm rustc_privacy
5858
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
5959
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
6060
TOOLS := compiletest rustdoc rustc rustbook
@@ -70,21 +70,20 @@ DEPS_graphviz := std
7070
DEPS_syntax := std term serialize log fmt_macros arena libc
7171
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
7272
rustc_typeck rustc_resolve log syntax serialize rustc_llvm \
73-
rustc_trans rustc_privacy rustc_lint
73+
rustc_trans rustc_privacy
7474

7575
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
7676
log syntax serialize rustc_llvm
7777
DEPS_rustc_typeck := rustc syntax
7878
DEPS_rustc_borrowck := rustc log graphviz syntax
7979
DEPS_rustc_resolve := rustc log syntax
8080
DEPS_rustc_privacy := rustc log syntax
81-
DEPS_rustc_lint := rustc log syntax
8281
DEPS_rustc := syntax flate arena serialize getopts rbml \
8382
log graphviz rustc_llvm rustc_back
8483
DEPS_rustc_llvm := native:rustllvm libc std
8584
DEPS_rustc_back := std syntax rustc_llvm flate log libc
8685
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
87-
test rustc_lint
86+
test
8887
DEPS_rustc_bitflags := core
8988
DEPS_flate := std native:miniz
9089
DEPS_arena := std
@@ -129,13 +128,11 @@ DOC_CRATES := $(filter-out rustc, \
129128
$(filter-out rustc_resolve, \
130129
$(filter-out rustc_driver, \
131130
$(filter-out rustc_privacy, \
132-
$(filter-out rustc_lint, \
133131
$(filter-out log, \
134132
$(filter-out getopts, \
135-
$(filter-out syntax, $(CRATES))))))))))))
133+
$(filter-out syntax, $(CRATES)))))))))))
136134
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \
137-
rustc_typeck rustc_driver syntax rustc_privacy \
138-
rustc_lint
135+
rustc_typeck rustc_driver syntax rustc_privacy
139136

140137
# This macro creates some simple definitions for each crate being built, just
141138
# some munging of all of the parameters above.

branches/try/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $(eval $(call RUST_CRATE,coretest))
2121

2222
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) coretest
2323
TEST_DOC_CRATES = $(DOC_CRATES)
24-
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve rustc_trans rustc_lint,\
24+
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve rustc_trans,\
2525
$(HOST_CRATES))
2626
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
2727

branches/try/src/compiletest/compiletest.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#![feature(std_misc)]
2121
#![feature(test)]
2222
#![feature(unicode)]
23+
#![feature(env)]
2324
#![feature(core)]
2425

2526
#![deny(warnings)]

branches/try/src/doc/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ use std::thread::Thread;
536536
537537
fn main() {
538538
let numbers = vec![1, 2, 3];
539-
539+
540540
let guards: Vec<_> = (0..3).map(|i| {
541541
Thread::scoped(move || {
542542
println!("{}", numbers[i]);
@@ -565,7 +565,7 @@ while retaining safety. The answer is iterators:
565565
```{rust}
566566
let vec = vec![1, 2, 3];
567567
568-
for x in &vec {
568+
for x in vec.iter() {
569569
println!("{}", x);
570570
}
571571
```

branches/try/src/doc/reference.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ nonzero_dec: '1' | '2' | '3' | '4'
302302

303303
A _character literal_ is a single Unicode character enclosed within two
304304
`U+0027` (single-quote) characters, with the exception of `U+0027` itself,
305-
which must be _escaped_ by a preceding `U+005C` character (`\`).
305+
which must be _escaped_ by a preceding U+005C character (`\`).
306306

307307
##### String literals
308308

@@ -311,19 +311,6 @@ A _string literal_ is a sequence of any Unicode characters enclosed within two
311311
which must be _escaped_ by a preceding `U+005C` character (`\`), or a _raw
312312
string literal_.
313313

314-
A multi-line string literal may be defined by terminating each line with a
315-
`U+005C` character (`\`) immediately before the newline. This causes the
316-
`U+005C` character, the newline, and all whitespace at the beginning of the
317-
next line to be ignored.
318-
319-
```rust
320-
let a = "foobar";
321-
let b = "foo\
322-
bar";
323-
324-
assert_eq!(a,b);
325-
```
326-
327314
##### Character escapes
328315

329316
Some additional _escapes_ are available in either character or non-raw string
@@ -3765,9 +3752,9 @@ An example of creating and calling a closure:
37653752
```rust
37663753
let captured_var = 10;
37673754

3768-
let closure_no_args = || println!("captured_var={}", captured_var);
3755+
let closure_no_args = |&:| println!("captured_var={}", captured_var);
37693756

3770-
let closure_args = |arg: i32| -> i32 {
3757+
let closure_args = |&: arg: i32| -> i32 {
37713758
println!("captured_var={}, arg={}", captured_var, arg);
37723759
arg // Note lack of semicolon after 'arg'
37733760
};

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

Lines changed: 4 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,13 @@ the Cargo
1818
README](https://github.com/rust-lang/cargo#installing-cargo-from-nightlies)
1919
for specific instructions about installing it.
2020

21-
## Converting to Cargo
22-
2321
Let's convert Hello World to Cargo.
2422

2523
To Cargo-ify our project, we need to do two things: Make a `Cargo.toml`
2624
configuration file, and put our source file in the right place. Let's
2725
do that part first:
2826

29-
```bash
27+
```{bash}
3028
$ mkdir src
3129
$ mv main.rs src/main.rs
3230
```
@@ -38,7 +36,7 @@ place for everything, and everything in its place.
3836

3937
Next, our configuration file:
4038

41-
```bash
39+
```{bash}
4240
$ editor Cargo.toml
4341
```
4442

@@ -75,7 +73,7 @@ well as what it is named.
7573

7674
Once you have this file in place, we should be ready to build! Try this:
7775

78-
```bash
76+
```{bash}
7977
$ cargo build
8078
Compiling hello_world v0.0.1 (file:///home/yourname/projects/hello_world)
8179
$ ./target/hello_world
@@ -105,62 +103,6 @@ That's it! We've successfully built `hello_world` with Cargo. Even though our
105103
program is simple, it's using much of the real tooling that you'll use for the
106104
rest of your Rust career.
107105

108-
## A New Project
109-
110-
You don't have to go through this whole process every time you want to start a new
111-
project! Cargo has the ability to make a bare-bones project directory in which you
112-
can start developing right away.
113-
114-
To start a new project with Cargo, use `cargo new`:
115-
116-
```bash
117-
$ cargo new hello_world --bin
118-
```
119-
120-
We're passing `--bin` because we're making a binary program: if we
121-
were making a library, we'd leave it off.
122-
123-
Let's check out what Cargo has generated for us:
124-
125-
```bash
126-
$ cd hello_world
127-
$ tree .
128-
.
129-
├── Cargo.toml
130-
└── src
131-
└── main.rs
132-
133-
1 directory, 2 files
134-
```
135-
136-
If you don't have the `tree` command, you can probably get it from your distro's package
137-
manager. It's not necessary, but it's certainly useful.
138-
139-
This is all we need to get started. First, let's check out `Cargo.toml`:
140-
141-
```toml
142-
[package]
143-
144-
name = "hello_world"
145-
version = "0.0.1"
146-
authors = ["Your Name <[email protected]>"]
147-
```
148-
149-
Cargo has populated this file with reasonable defaults based off the arguments you gave
150-
it and your `git` global configuration. You may notice that Cargo has also initialized
151-
the `hello_world` directory as a `git` repository.
152-
153-
Here's what's in `src/main.rs`:
154-
155-
```rust
156-
fn main() {
157-
println!("Hello, world!");
158-
}
159-
```
160-
161-
Cargo has generated a "Hello World!" for us, and you're ready to start coding! A
162-
much more in-depth guide to Cargo can be found [here](http://doc.crates.io/guide.html).
163-
164106
Now that you've got the tools down, let's actually learn more about the Rust
165107
language itself. These are the basics that will serve you well through the rest
166-
of your time with Rust.
108+
of your time with Rust.

branches/try/src/doc/trpl/installing-rust.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ If you've got Rust installed, you can open up a shell, and type this:
7070
$ rustc --version
7171
```
7272

73-
You should see the version number, commit hash, commit date and build date:
73+
You should see some output that looks something like this:
7474

7575
```bash
76-
rustc 1.0.0-nightly (f11f3e7ba 2015-01-04) (built 2015-01-06)
76+
rustc 1.0.0-nightly (f11f3e7ba 2015-01-04 20:02:14 +0000)
7777
```
7878

7979
If you did, Rust has been installed successfully! Congrats!

branches/try/src/doc/trpl/plugins.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ extern crate rustc;
7171
use syntax::codemap::Span;
7272
use syntax::parse::token;
7373
use syntax::ast::{TokenTree, TtToken};
74-
use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacEager};
75-
use syntax::ext::build::AstBuilder; // trait for expr_usize
74+
use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacExpr};
75+
use syntax::ext::build::AstBuilder; // trait for expr_uint
7676
use rustc::plugin::Registry;
7777
7878
fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
@@ -107,7 +107,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
107107
}
108108
}
109109
110-
MacEager::expr(cx.expr_usize(sp, total))
110+
MacExpr::new(cx.expr_uint(sp, total))
111111
}
112112
113113
#[plugin_registrar]
@@ -183,7 +183,7 @@ with
183183
[`syntax::print::pprust::*_to_string`](http://doc.rust-lang.org/syntax/print/pprust/index.html#functions).
184184

185185
The example above produced an integer literal using
186-
[`AstBuilder::expr_usize`](../syntax/ext/build/trait.AstBuilder.html#tymethod.expr_usize).
186+
[`AstBuilder::expr_uint`](../syntax/ext/build/trait.AstBuilder.html#tymethod.expr_uint).
187187
As an alternative to the `AstBuilder` trait, `libsyntax` provides a set of
188188
[quasiquote macros](../syntax/ext/quote/index.html). They are undocumented and
189189
very rough around the edges. However, the implementation may be a good

branches/try/src/etc/htmldocck.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@
9696
highlights for example. If you want to simply check the presence of
9797
given node or attribute, use an empty string (`""`) as a `PATTERN`.
9898
99-
* `@count PATH XPATH COUNT' checks for the occurrence of given XPath
100-
in the given file. The number of occurrences must match the given count.
101-
10299
All conditions can be negated with `!`. `@!has foo/type.NoSuch.html`
103100
checks if the given file does not exist, for example.
104101
@@ -336,11 +333,6 @@ def check_tree_text(tree, path, pat, regexp):
336333
return ret
337334

338335

339-
def check_tree_count(tree, path, count):
340-
path = normalize_xpath(path)
341-
return len(tree.findall(path)) == count
342-
343-
344336
def check(target, commands):
345337
cache = CachedFiles(target)
346338
for c in commands:
@@ -368,13 +360,6 @@ def check(target, commands):
368360
raise RuntimeError('Invalid number of @{} arguments \
369361
at line {}'.format(c.cmd, c.lineno))
370362

371-
elif c.cmd == 'count': # count test
372-
if len(c.args) == 3: # @count <path> <pat> <count> = count test
373-
ret = check_tree_count(cache.get_tree(c.args[0]), c.args[1], int(c.args[2]))
374-
else:
375-
raise RuntimeError('Invalid number of @{} arguments \
376-
at line {}'.format(c.cmd, c.lineno))
377-
378363
elif c.cmd == 'valid-html':
379364
raise RuntimeError('Unimplemented @valid-html at line {}'.format(c.lineno))
380365

branches/try/src/liballoc/arc.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,6 @@ pub struct Weak<T> {
139139
unsafe impl<T: Sync + Send> Send for Weak<T> { }
140140
unsafe impl<T: Sync + Send> Sync for Weak<T> { }
141141

142-
#[stable(feature = "rust1", since = "1.0.0")]
143-
impl<T: fmt::Debug> fmt::Debug for Weak<T> {
144-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
145-
write!(f, "(Weak)")
146-
}
147-
}
148-
149142
struct ArcInner<T> {
150143
strong: atomic::AtomicUsize,
151144
weak: atomic::AtomicUsize,

branches/try/src/liballoc/heap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ mod imp {
300300
libc::realloc(ptr as *mut libc::c_void, size as libc::size_t) as *mut u8
301301
} else {
302302
let new_ptr = allocate(size, align);
303-
ptr::copy(new_ptr, ptr, cmp::min(size, old_size));
303+
ptr::copy_memory(new_ptr, ptr, cmp::min(size, old_size));
304304
deallocate(ptr, old_size, align);
305305
new_ptr
306306
}

branches/try/src/libcollections/btree/node.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ impl<K, V> Node<K, V> {
10851085
vals: RawItems::from_slice(self.vals()),
10861086
edges: RawItems::from_slice(self.edges()),
10871087

1088-
ptr: Unique::new(*self.keys as *mut u8),
1088+
ptr: *self.keys as *mut u8,
10891089
capacity: self.capacity(),
10901090
is_leaf: self.is_leaf()
10911091
},
@@ -1354,14 +1354,11 @@ struct MoveTraversalImpl<K, V> {
13541354
edges: RawItems<Node<K, V>>,
13551355

13561356
// For deallocation when we are done iterating.
1357-
ptr: Unique<u8>,
1357+
ptr: *mut u8,
13581358
capacity: usize,
13591359
is_leaf: bool
13601360
}
13611361

1362-
unsafe impl<K: Sync, V: Sync> Sync for MoveTraversalImpl<K, V> {}
1363-
unsafe impl<K: Send, V: Send> Send for MoveTraversalImpl<K, V> {}
1364-
13651362
impl<K, V> TraversalImpl for MoveTraversalImpl<K, V> {
13661363
type Item = (K, V);
13671364
type Edge = Node<K, V>;
@@ -1404,7 +1401,7 @@ impl<K, V> Drop for MoveTraversalImpl<K, V> {
14041401

14051402
let (alignment, size) =
14061403
calculate_allocation_generic::<K, V>(self.capacity, self.is_leaf);
1407-
unsafe { heap::deallocate(*self.ptr, size, alignment) };
1404+
unsafe { heap::deallocate(self.ptr, size, alignment) };
14081405
}
14091406
}
14101407

@@ -1428,12 +1425,12 @@ pub enum TraversalItem<K, V, E> {
14281425
/// A traversal over a node's entries and edges
14291426
pub type Traversal<'a, K, V> = AbsTraversal<ElemsAndEdges<Zip<slice::Iter<'a, K>,
14301427
slice::Iter<'a, V>>,
1431-
slice::Iter<'a, Node<K, V>>>>;
1428+
slice::Iter<'a, Node<K, V>>>>;
14321429

14331430
/// A mutable traversal over a node's entries and edges
14341431
pub type MutTraversal<'a, K, V> = AbsTraversal<ElemsAndEdges<Zip<slice::Iter<'a, K>,
14351432
slice::IterMut<'a, V>>,
1436-
slice::IterMut<'a, Node<K, V>>>>;
1433+
slice::IterMut<'a, Node<K, V>>>>;
14371434

14381435
/// An owning traversal over a node's entries and edges
14391436
pub type MoveTraversal<K, V> = AbsTraversal<MoveTraversalImpl<K, V>>;

0 commit comments

Comments
 (0)