Skip to content

Commit 4c301bd

Browse files
committed
---
yaml --- r: 209606 b: refs/heads/try c: dd5eed4 h: refs/heads/master v: v3
1 parent bee38c1 commit 4c301bd

File tree

116 files changed

+1212
-2211
lines changed

Some content is hidden

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

116 files changed

+1212
-2211
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: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: 93d8ba29066c8c81185e54a6d686d18165faa6e8
5+
refs/heads/try: dd5eed4b8136849537d1b2c8655bd29dc976d89a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
#
7777
# * `CFG_ENABLE_VALGRIND=1` - Run tests under valgrind
7878
# * `VALGRIND_COMPILE=1` - Run the compiler itself under valgrind
79-
# (requires `CFG_ENABLE_VALGRIND`)
79+
# (may require `CFG_ENABLE_VALGRIND`)
8080
#
8181
# * `NO_REBUILD=1` - Don't rebootstrap when testing std
8282
# (and possibly other crates)

branches/try/mk/crates.mk

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,18 @@
5252
TARGET_CRATES := libc std flate arena term \
5353
serialize getopts collections test rand \
5454
log graphviz core rbml alloc \
55-
rustc_unicode rustc_bitflags
55+
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 \
58-
rustc_data_structures
57+
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint
5958
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
6059
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
6160
TOOLS := compiletest rustdoc rustc rustbook
6261

6362
DEPS_core :=
6463
DEPS_libc := core
65-
DEPS_rustc_unicode := core
64+
DEPS_unicode := core
6665
DEPS_alloc := core libc native:jemalloc
67-
DEPS_std := core libc rand alloc collections rustc_unicode \
66+
DEPS_std := core libc rand alloc collections unicode \
6867
native:rust_builtin native:backtrace native:rustrt_native \
6968
rustc_bitflags
7069
DEPS_graphviz := std
@@ -81,10 +80,9 @@ DEPS_rustc_resolve := rustc log syntax
8180
DEPS_rustc_privacy := rustc log syntax
8281
DEPS_rustc_lint := rustc log syntax
8382
DEPS_rustc := syntax flate arena serialize getopts rbml \
84-
log graphviz rustc_llvm rustc_back rustc_data_structures
83+
log graphviz rustc_llvm rustc_back
8584
DEPS_rustc_llvm := native:rustllvm libc std
8685
DEPS_rustc_back := std syntax rustc_llvm flate log libc
87-
DEPS_rustc_data_structures := std log serialize
8886
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
8987
test rustc_lint
9088
DEPS_rustc_bitflags := core
@@ -96,7 +94,7 @@ DEPS_serialize := std log
9694
DEPS_rbml := std log serialize
9795
DEPS_term := std log
9896
DEPS_getopts := std
99-
DEPS_collections := core alloc rustc_unicode
97+
DEPS_collections := core alloc unicode
10098
DEPS_num := std
10199
DEPS_test := std getopts serialize rbml term native:rust_test_helpers
102100
DEPS_rand := core
@@ -117,11 +115,11 @@ ONLY_RLIB_libc := 1
117115
ONLY_RLIB_alloc := 1
118116
ONLY_RLIB_rand := 1
119117
ONLY_RLIB_collections := 1
120-
ONLY_RLIB_rustc_unicode := 1
118+
ONLY_RLIB_unicode := 1
121119
ONLY_RLIB_rustc_bitflags := 1
122120

123121
# Documented-by-default crates
124-
DOC_CRATES := std alloc collections core libc rustc_unicode
122+
DOC_CRATES := std alloc collections core libc unicode
125123

126124
################################################################################
127125
# You should not need to edit below this line

branches/try/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CFG_RELEASE_NUM=1.0.0
1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release
2020
# versions (section 9)
21-
CFG_PRERELEASE_VERSION=.3
21+
CFG_PRERELEASE_VERSION=.2
2222

2323
CFG_FILENAME_EXTRA=4e7c5e5c
2424

branches/try/mk/platform.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ endif
4646
# see https://blog.mozilla.org/jseward/2012/06/05/valgrind-now-supports-jemalloc-builds-directly/
4747
ifdef CFG_VALGRIND
4848
CFG_VALGRIND += --error-exitcode=100 \
49-
--fair-sched=try \
50-
--quiet \
5149
--soname-synonyms=somalloc=NONE \
50+
--quiet \
5251
--suppressions=$(CFG_SRC_DIR)src/etc/x86.supp \
5352
$(OS_SUPP)
5453
ifdef CFG_ENABLE_HELGRIND

branches/try/mk/tests.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
# The names of crates that must be tested
1717

18-
# libcore/librustc_unicode tests are in a separate crate
18+
# libcore/libunicode tests are in a separate crate
1919
DEPS_coretest :=
2020
$(eval $(call RUST_CRATE,coretest))
2121

2222
DEPS_collectionstest :=
2323
$(eval $(call RUST_CRATE,collectionstest))
2424

25-
TEST_TARGET_CRATES = $(filter-out core rustc_unicode,$(TARGET_CRATES)) \
25+
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) \
2626
collectionstest coretest
2727
TEST_DOC_CRATES = $(DOC_CRATES)
2828
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve \

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ we hadn’t changed the source file, and so it just ran the binary. If we had
8989
made a modification, we would have seen it do both:
9090

9191
```bash
92-
$ cargo run
92+
$ cargo build
9393
Compiling hello_world v0.0.1 (file:///home/yourname/projects/hello_world)
9494
Running `target/debug/hello_world`
9595
Hello, world!
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
% Lifetimes
22

3-
Coming Soon! Until then, check out the [ownership](ownership.html) chapter.
3+
Coming soon!
Lines changed: 1 addition & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,3 @@
11
% Move Semantics
22

3-
An important aspect of [ownership][ownership] is ‘move semantics’. Move
4-
semantics control how and when ownership is transferred between bindings.
5-
6-
[ownership]: ownership.html
7-
8-
For example, consider a type like `Vec<T>`, which owns its contents:
9-
10-
```rust
11-
let v = vec![1, 2, 3];
12-
```
13-
14-
I can assign this vector to another binding:
15-
16-
```rust
17-
let v = vec![1, 2, 3];
18-
19-
let v2 = v;
20-
```
21-
22-
But, if we try to use `v` afterwards, we get an error:
23-
24-
```rust,ignore
25-
let v = vec![1, 2, 3];
26-
27-
let v2 = v;
28-
29-
println!("v[0] is: {}", v[0]);
30-
```
31-
32-
It looks like this:
33-
34-
```text
35-
error: use of moved value: `v`
36-
println!("v[0] is: {}", v[0]);
37-
^
38-
```
39-
40-
A similar thing happens if we define a function which takes ownership, and
41-
try to use something after we’ve passed it as an argument:
42-
43-
```rust
44-
fn take(v: Vec<i32>) {
45-
// what happens here isn’t important.
46-
}
47-
48-
let v = vec![1, 2, 3];
49-
50-
take(v);
51-
52-
println!("v[0] is: {}", v[0]);
53-
```
54-
55-
Same error: “use of moved value.” When we transfer ownership to something else,
56-
we say that we’ve ‘moved’ the thing we refer to. You don’t need some sort of
57-
special annotation here, it’s the default thing that Rust does.
58-
59-
# The details
60-
61-
The reason that we cannot use a binding after we’ve moved it is subtle, but
62-
important. When we write code like this:
63-
64-
```rust
65-
let v = vec![1, 2, 3];
66-
67-
let v2 = v;
68-
```
69-
70-
The first line creates some data for the vector on the stack, `v`. The vector’s
71-
data, however, is stored on the heap, and so it contains a pointer to that
72-
data. When we move `v` to `v2`, it creates a copy of that data, for `v2`. Which
73-
would mean two pointers to the contents of the vector on the heap. That would
74-
be a problem: it would violate Rust’s safety guarantees by introducing a data
75-
race. Therefore, Rust forbids using `v` after we’ve done the move.
76-
77-
It’s also important to note that optimizations may remove the actual copy of
78-
the bytes, depending on circumstances. So it may not be as inefficient as it
79-
initially seems.
80-
81-
# `Copy` types
82-
83-
We’ve established that when ownership is transferred to another binding, you
84-
cannot use the original binding. However, there’s a [trait][traits] that changes this
85-
behavior, and it’s called `Copy`. We haven’t discussed traits yet, but for now,
86-
you can think of them as an annotation to a particular type that adds extra
87-
behavior. For example:
88-
89-
```rust
90-
let v = 1;
91-
92-
let v2 = v;
93-
94-
println!("v is: {}", v);
95-
```
96-
97-
In this case, `v` is an `i32`, which implements the `Copy` trait. This means
98-
that, just like a move, when we assign `v` to `v2`, a copy of the data is made.
99-
But, unlike a move, we can still use `v` afterward. This is because an `i32`
100-
has no pointers to data somewhere else, copying it is a full copy.
101-
102-
We will discuss how to make your own types `Copy` in the [traits][traits]
103-
section.
104-
105-
[traits]: traits.html
3+
Coming Soon
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
% References and Borrowing
22

3-
Coming Soon! Until then, check out the [ownership](ownership.html) chapter.
3+
Coming Soon!

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
% Vectors
22

33
A *vector* is a dynamic or "growable" array, implemented as the standard
4-
library type [`Vec<T>`](../std/vec/) (Where `<T>` is a [Generic](./generics.md)
5-
statement). Vectors always allocate their data on the heap. Vectors are to
6-
[slices][slices] what [`String`][string] is to `&str`. You can
7-
create them with the `vec!` macro:
4+
library type [`Vec<T>`](../std/vec/) (Where `<T>` is a [Generic](./generics.md) statement). Vectors always allocate their data on the heap. Vectors are to slices
5+
what `String` is to `&str`. You can create them with the `vec!` macro:
86

97
```{rust}
108
let v = vec![1, 2, 3]; // v: Vec<i32>
119
```
1210

13-
[slices]: primitive-types.html#slices
14-
[string]: strings.html
15-
1611
(Notice that unlike the `println!` macro we've used in the past, we use square
1712
brackets `[]` with `vec!`. Rust allows you to use either in either situation,
1813
this is just convention.)

branches/try/src/etc/unicode.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -518,14 +518,11 @@ def comp_pfun(char):
518518
emit_table(f, "combining_class_table", combine, "&'static [(char, char, u8)]", is_pub=False,
519519
pfun=lambda x: "(%s,%s,%s)" % (escape_char(x[0]), escape_char(x[1]), x[2]))
520520

521-
f.write(""" #[deprecated(reason = "use the crates.io `unicode-normalization` lib instead",
522-
since = "1.0.0")]
523-
#[unstable(feature = "unicode",
524-
reason = "this functionality will be moved to crates.io")]
525-
pub fn canonical_combining_class(c: char) -> u8 {
526-
bsearch_range_value_table(c, combining_class_table)
527-
}
521+
f.write(" pub fn canonical_combining_class(c: char) -> u8 {\n"
522+
+ " bsearch_range_value_table(c, combining_class_table)\n"
523+
+ " }\n")
528524

525+
f.write("""
529526
}
530527
531528
""")

branches/try/src/libcollections/fmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,6 @@ use string;
443443
#[stable(feature = "rust1", since = "1.0.0")]
444444
pub fn format(args: Arguments) -> string::String {
445445
let mut output = string::String::new();
446-
let _ = output.write_fmt(args);
446+
let _ = write!(&mut output, "{}", args);
447447
output
448448
}

branches/try/src/libcollections/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
#[macro_use]
5151
extern crate core;
5252

53-
extern crate rustc_unicode;
53+
extern crate unicode;
5454
extern crate alloc;
5555

5656
#[cfg(test)] #[macro_use] extern crate std;

0 commit comments

Comments
 (0)